Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attaching to a remote EH process actually debugs the parent server process #1914

Closed
roblourens opened this issue Dec 30, 2023 · 4 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@roblourens
Copy link
Member

  • Connect to an ssh remote
  • Start this debug config
{
    "name": "Attach by Process ID",
    "processId": "${command:PickProcess}",
    "request": "attach",
    "skipFiles": [
        "<node_internals>/**"
    ],
    "type": "node"
}
  • Pick the pid of the extension host, or one of its children
  • Check process.pid in the debug console to see that you got attached to the server process instead
  • Also, setting
"attachExistingChildren": true,
"autoAttachChildProcesses": true,

doesn't make a difference

@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Dec 30, 2023
@roblourens
Copy link
Member Author

@fellotin

This comment was marked as spam.

@connor4312
Copy link
Member

I cannot reproduce this. But note that putting a process in debug mode involves sending a SIGUSR1 signal to the process which causes it to listen on 9229. If something else was already listening on that port for any reason, that will be connected to instead of the desired process. Would that explain what you were seeing? / was the server process already listening on 9229 prior to running that command?

@connor4312 connor4312 added the info-needed Issue requires more information from poster label Jan 4, 2024
@connor4312
Copy link
Member

Let me know if you have more info / think there's an underlying issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants