-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Description
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:
- Informs the debugger that a new node child process is going to be launched
- Allows the debugger to decide whether that process will be debuggable
- If true, the debug port will be provided to the debugger and the debugger could launch a new instance of itself on that.
- Allows the debugger to decide whether that process will be debuggable