You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: API for debugging node child processes #9621
Kind-of-recent changes in the debugging feature make it easy to debug a node process with whatever debugger speaks the protocol. Most notable, perhaps, is Chrome DevTools.
For me, experience is smooth and I'm happy until I reach the great wall of the child process. For example, debugging any test that's run with my favorite test runner, https://github.com/avajs/ava, is kind of impossible, because all of the tests run in child processes and there's no feature to allow running tests in the main process.
One of the experiments is available here - https://github.com/eugeneo/node-restarter - it allows using Ctrl+R keybinding from the Chrome devtools debugger to restart the Node process (other frontends likely have some way of "reloading" as well).
Note that the restarter script currently needs patched Node, we are looking into bringing the code into the main line.
For example, debugging any test that's run with my favorite test runner, https://github.com/avajs/ava, is kind of impossible, because all of the tests run in child processes and there's no feature to allow running tests in the main process.
@jaridmargolin#13619 and #14140 for the cluster module, the inspector saw several upgrades, and there has been discussion on extending the cluster fixes to the child_process module.
(I had a hard time finding back that last issue though. It's.. somewhere in the bug tracker.)
Activity
eugeneo commentedon Nov 15, 2016
Our team is currently investigating this, it was part of the rationale for the Node inspector agent refactoring that is currently being worked on.
eugeneo commentedon Nov 15, 2016
One of the experiments is available here - https://github.com/eugeneo/node-restarter - it allows using Ctrl+R keybinding from the Chrome devtools debugger to restart the Node process (other frontends likely have some way of "reloading" as well).
Note that the restarter script currently needs patched Node, we are looking into bringing the code into the main line.
eugeneo commentedon Nov 16, 2016
This PR is beginning the process of decoupling the HTTP transport: #9630
develar commentedon Nov 16, 2016
It is already fixed and you can use or IDEA/Webstorm, or node inspector to debug tests. Please see https://github.com/avajs/ava/blob/master/docs/recipes/debugging-with-webstorm.md and avajs/ava#874
develar commentedon Nov 16, 2016
I have filed avajs/ava#1110
Trott commentedon Jul 15, 2017
Should this remain open?
bnoordhuis commentedon Jul 17, 2017
I'll close this out, the necessary work in node.js has been done, as far as I can tell.
jaridmargolin commentedon Jul 17, 2017
@bnoordhuis - could you please link to PR, commits, or docs in regards to:
bnoordhuis commentedon Jul 17, 2017
@jaridmargolin #13619 and #14140 for the cluster module, the inspector saw several upgrades, and there has been discussion on extending the cluster fixes to the child_process module.
(I had a hard time finding back that last issue though. It's.. somewhere in the bug tracker.)
medikoo commentedon Jul 18, 2017
Seems related to #9435