I would like to use node-inspector to debug an application written with Derbyjs, but have not had much success. I think the problem is that derby runs in a child process. My code loads like this:
derby.run(function () {
...
});
When I start the app with node-inspector, I see none of the normal startup output I write to the log. But also, when I go to the url that node-inspector outputs,
http://127.0.0.1:8080/debug?port=5858
nothing happens. I've used node-inspector before, and never really had to do much of anything to get it working. Not sure what to do to get it working.
Yes you are right.
The problem is that derby forks processes and they are not assigned a different debugging port. So in theory you can only debug the first derby "app".
I made a pull request to work around this, but it hasn't been merged yet.
Please visit https://github.com/derbyjs/derby/pull/472 and merge it in your local project. After that you'll be able to debug using node-inspector.
Master process is assigned
App 1
...
Then use --debug flag in node
Using node-inspector