I'll be very specific here in the hope that folks who understand this can edit to rephrase to the general situation.
Currently when you run "node debug", it spawns a process to listen on port 5858. Then in the parent a connection is attempted to that port.
However if you have another "node debug" session running, currently "node debug" hangs because that port is in use.
Specifically the message you see is:
$ node debug example/gcd.js 3 5 < debugger listening on port 5858 connecting...
Better would be for it to detect that the port is in use (without a connecting to it which might mess up another client that is trying to connect that existing debugger).
With the solution, I hope address this situation in trepanjs.