Skip to content

Impossible to debug multi-threaded processes on headless server. #16469

@conartist6

Description

@conartist6

See closed issue #9435
and
#5025

While it is possible now to run node --inspect-brk=0, this only waits for a GUI to connect to the debugger. In my case a restrictive network configuration means that I can't actually connect a GUI debugger to a completely random port.

Thus my circumstances dictate that I need to use the CLI debugger with a random port. I would assume that the command to run would be

Expected: node inspect --inspect-port 0 launches the CLI debugger in the main thread, and the background thread does not crash with port 9229 in use errors.

Actual:

scripts/ads/interfaces/ice_routing/generate
< Debugger listening on ws://127.0.0.1:39163/7bc855ba-cd5e-4ad0-9c17-e3b04d94aae3
< For help see https://nodejs.org/en/docs/inspector
connecting to 127.0.0.1:9229 ............ failed to connect, please retry

In other news I'd love to know where we could track progress towards being able to debug multiple child processes over a single port.

Metadata

Metadata

Assignees

No one assigned

    Labels

    inspectorIssues and PRs related to the V8 inspector protocol

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions