Skip to content

Cannot attach to second node process by using SIGUSR1 #18639

@aldafu

Description

@aldafu
  • Version: 6.12.3 +
  • Platform: Win 10 x64 / Linux 4.x
  • Subsystem:

Suppose I have two or more running node processes which are not in debugging mode and I want to activate the debugger in these processes. By using SIGUSR1 or process._debugProcess() the process starts listening on the default port 5858 for the debugging client. All node processes after the first that receive SIGUSR1 will fail to take port 5858 and thus cannot be debugged while already running.

Worse, if you use node debug -p $PID_OF_SECOND_PROCESS the debugger will attach to the first node process that was able to take port 5858 instead of the PID given on the command-line.

Is there any way to change the default debugging port for an already running node process, so I can attach to that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to the documentations.good first issueIssues that are suitable for first-time contributors.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