deno
c29f8e10 - feat(inspector): start inspector server on SIGUSR1 (#35738)

Commit
98 days ago
feat(inspector): start inspector server on SIGUSR1 (#35738) In Node.js you can start the inspector on an already running process by sending it SIGUSR1, which is useful for debugging long-running tasks that cannot easily be restarted with --inspect. This adds the same capability to deno: on Unix, sending SIGUSR1 starts the inspector server on the default 127.0.0.1:9229 without pausing execution, and prints the usual "Debugger listening on ws://..." banner. The listener is installed after a 500ms grace period so short-lived programs don't pay the cost of a process-wide signal handler (a trivial `deno eval` still exits in ~30ms). If the inspector server is already running (an --inspect* flag, node:inspector's open(), or a previous SIGUSR1), the signal is a no-op. The activation reuses the runtime registration path that already backs node:inspector's open(). JS listeners added with Deno.addSignalListener("SIGUSR1") keep working alongside it. Closes #9312
Author
Parents
Loading