Node: known limitation: when running with `--inspect=localhost:0` only one port is printed

Created on 19 Jun 2017  路  6Comments  路  Source: nodejs/node

  • Version: 9-pre
  • Platform: *
  • Subsystem: inspector,cli


A know limitation after #13478
If node is started with a hostname and port 0, the process will possibly bind 2 sockets with two different ports, but print only one

d:\code\node-cur$ node9pre.exe --inspect=localhost:0
Debugger listening on ws://localhost:63448/38595be5-d6d8-4142-bdbb-25133971f734
For help see https://nodejs.org/en/docs/inspector
>

image

cli feature request inspector

Most helpful comment

I'm relabeling this feature request, it seems useful.

All 6 comments

My understanding is that the console output (e.g. the "Debugger listening on ws://localhost:63448/38595be5-d6d8-4142-bdbb-25133971f734") message is pretty much considered an API as other software may be parsing the output. I can change the output to include multiple ports/hosts - but I would like to discuss the suggested format.

I don't think the output format should be changed, the message should just be repeated in a loop, once for each listen that was done in InspectorSoketServer::Start()

And to be clear, I don't think thats semver-major. Any code grepping output will find one of the instances, first or last, who knows (but its random right now which of the server socket addresses is printed anyway).

@refack What would you like to do with this? I suggest either close as a known limitation or promote to a feature request (print multiple lines).

I'm relabeling this feature request, it seems useful.

26008

Was this page helpful?
0 / 5 - 0 ratings