-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: API for debugging node child processes #9621
Comments
Our team is currently investigating this, it was part of the rationale for the Node inspector agent refactoring that is currently being worked on. |
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. |
This PR is beginning the process of decoupling the HTTP transport: #9630 |
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 |
I have filed avajs/ava#1110 |
Should this remain open? |
I'll close this out, the necessary work in node.js has been done, as far as I can tell. |
@bnoordhuis - could you please link to PR, commits, or docs in regards to:
|
@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.) |
Seems related to #9435 |
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.
Further, a wrapper tool makes it trivial to start a node process with debugging on and launch the debugger on that. An example that I'm using is https://github.com/jaridmargolin/inspect-process.
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.
inspect-process is considering monkey-patching methods of
child_process
for this purpose.What I request is an API that will solve this.
Here’s a thought: An addition to the debugging protocol that:
The text was updated successfully, but these errors were encountered: