You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
inspector aborts when another process is running the inspector #10858
IMO this should not abort, instead just exit normally (EDIT: I think --debug just throws an exception, doesn't exit, anyway if it does exit, should exit with a non-zero exit code) throw an exception with some message telling the address/socket is being used(unless people pass in --abort-on-uncaught-exceptions).
--debug uses Error: listen EADDRINUSE 127.0.0.1:5858, --inspect currently shows Unable to open devtools socket: address already in use but I would say mimicking the behavior of --debug is less confusing(more familiar) to users. And I think an additional hint like "Are you running another node instance with --inspect?" would be more friendly to beginners(googling for EADDRINUSE 5858 shows a lot of confused questions).
Assert was a bug, I created a pull request with a fix. That pull request also changes the message to be more in line with what the old debugger prints.
As to "Are you running another node instance with --inspect?" - the error message needs to be generic as the code does not know if the failure is because the port is bound or if there's some other failure.
Activity
eugeneo commentedon Jan 18, 2017
#10861 changes the test so it uses autodiscovered port (so it does not conflict with another instance of the test running or with node --inspect).
Not sure what is the desired behavior for running two instances of node with --inspect...
joyeecheung commentedon Jan 18, 2017
IMO this should not abort, instead just
exit normally(EDIT: I think--debugjust throws an exception, doesn't exit, anyway if it does exit, should exit with a non-zero exit code) throw an exception with some message telling the address/socket is being used(unless people pass in--abort-on-uncaught-exceptions).--debugusesError: listen EADDRINUSE 127.0.0.1:5858,--inspectcurrently showsUnable to open devtools socket: address already in usebut I would say mimicking the behavior of--debugis less confusing(more familiar) to users. And I think an additional hint like "Are you running another node instance with --inspect?" would be more friendly to beginners(googling forEADDRINUSE 5858shows a lot of confused questions).eugeneo commentedon Jan 18, 2017
Assert was a bug, I created a pull request with a fix. That pull request also changes the message to be more in line with what the old debugger prints.
As to "Are you running another node instance with --inspect?" - the error message needs to be generic as the code does not know if the failure is because the port is bound or if there's some other failure.
test: have inspector test pick an open port
test: have inspector test pick an open port
inspector: no crash when WS server can't start
inspector: no crash when WS server can't start
inspector: no crash when WS server can't start