Profiling locks up UI, and doesn't work at start
node-inspector v0.12.7 node v5.8.0 OS X 10.11.1 Chrome v49
$ node-debug foo.js
Node Inspector v0.12.7
Visit http://127.0.0.1:8080/?port=5858 to start debugging.
Debugging `foo.js`
Debugger listening on port 5858The program is started paused, and a chrome window with devtools is opened. If I go to the Profiles tab, pick "Collect JavaScript CPU Profile", and hit Start, then Profiler.start failed. Error: Debugger: Unknown command "Profiler.start" in request appears in the console if I have the tray opened (the one toggled by the Escape key). I can no longer switch tabs, so I can't get to the proper console tab or the sources tab to resume the program.
Pushing Stop causes Profiler.stop failed. Error: Debugger: Unknown command "Profiler.stop" in request to show up in the console tray. Right-clicking the in-progress profile and clicking "Delete" restores the UI to a normal state, except that the program is still paused, and devtools says the program is unpaused.
Starting over... if I start the program, set a breakpoint somewhere, hit play to get to the breakpoint, remove the breakpoint, and start a CPU profile, I don't get any errors in the console tray, but the UI locks up, so I can't even tell the program to unpause. If I stop the profile, then the UI unlocks properly this time, but the profile is useless because it's just a profile of a paused program.
Starting over... if I start the program, hit play, start a CPU profile before the program finishes, let the program play past the point that it would have ended if node-inspector weren't keeping it alive, and stop the profile, then the UI stays locked up, and the profile never becomes viewable.
After a lot of trial and error, it seems like the only way I can profile a program is if the program is already running unpaused at the start, and then stop the profile before the program reaches its natural end. I can set a breakpoint before the end, but I'm given no indication at all when the breakpoint is hit while profiling.
Source: node-inspector/node-inspector