Skip to content

Attach the debugger to a remote instance of python process #1669

Closed
@DonJayamanne

Description

@DonJayamanne

E.g. attach debugger to remote python processes

Scenarios:

  • Debug existing remote python process on remote server
  • Debug existing remote python process in docker container
  • This is identical to attach to local procecss, except we're attaching to a remote process.

Workflow:

  • User clicks some button or click start remote debugging
  • We prompt user for SSH credentiails
  • We connect to remote server over SSH
  • We display a list of remote python processes that are running in a dropdown list
  • User selects a python process from the dropdown list
  • Next, we attach the debugger to the remote process just as we attach to a local process (inject debugger).
    • I.e. copy ptvsd to remote server (or remote pip install, etc)
    • Inject ptvsd into process
    • Start debugger in attach mode (as will be done for multi-process debugging in ptvsd).
    • Go back to VSC with the necessary information
  • From local VSC, attach the to remote debug server (we have IP and port, and other information).

User is now debugging a remote process

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions