Open lucacasonato opened 3 years ago
Yeah been thinking this as-well; but with one addition (tangent really), another signal to drop into an interactive session from any run-like command.
If this was added, then maybe add something similar to node's process._debugProcess to also support windows.
Inspector instance is now created for all isolate, so technically there's nothing preventing us from implementing this feature (which would mean spawning a WS inspector server when signal is received).
In some cases it is useful to be able to start the inspector on an already running process (for example a long running task that you can not easily restart). Deno currently has no infrastructure to support this. Currently the only way to enable the debugger is through
--inspect
or--inspect-brk
.In Node you can start the inspector on an already running process by sending the process a
SIGUSR1
signal. See Node docs: https://nodejs.org/api/process.html#process_signal_events & article on the topic: https://blog.sqreen.com/memory-leaks-nodejs-heroku/.It would be cool if we supported something like to this.