I get this in the Node 20 debugger now:
(To exit, press Ctrl+C again or Ctrl+D or type .exit)
debug> restart
< Debugger ending on ws://127.0.0.1:9229/d13150be-54f5-4aaa-8686-62d8727ddd61
< For help, see: https://nodejs.org/en/docs/inspector
<
debug> Uncaught:
Error [ERR_DEBUGGER_STARTUP_ERROR]: Timeout (3000) waiting for 127.0.0.1:9229 to be free
at portIsFree (node:internal/debugger/inspect:65:13)
at async runScript (node:internal/debugger/inspect:85:3) {
code: 'ERR_DEBUGGER_STARTUP_ERROR'
}
So, I'm trying to restart the debugger, but it isn't releasing the port before it restarts, so it can't restart. Ctrl+C and running it again doesn't dodge the problem, either.
I don't know what's going on, but this didn't used to happen in Node 14. I bet they thought this was no big deal, but the debugger is one of the most valuable things that Node has. This makes it so that you can only debug once without hassle, and just console.log maybe less trouble than doing this then finding the PID on every run.