Skip to content

Support debugging a "pristine" process. #1381

@ericsnowcurrently

Description

@ericsnowcurrently

As noted in #1379, the current default launch config implies that attach only works across a network connection. From what I can tell, in fact it only works for processes that were started with the debugger. This excludes debugging processes that were already running without the debugger (i.e. "pristine").

Let's say you have a long-running service running on a bunch of hosts (obviously not in your production environment ). On one host you have a particular problem but none of your other hosts have that problem at the moment. The problem happens relatively frequently across your hosts with no apparent pattern and each time before you simply restarted the service. However you've gotten tired of the alerts while on pager duty and decide to get to the bottom of it. You decide to attach the debugger to that process. Obviously you did not start the process with the debugger so all you have is the PID. (Let's leave the whole local/remote issue out of this.) What can you do as a user of the extension?

Environment data

  • VS Code version: 1.22.1
  • Extension version (available under the Extensions sidebar): 2018.3.1
  • OS and version: Ubuntu 16.04
  • Python version (& distribution if applicable, e.g. Anaconda): n/a
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): n/a
  • Relevant/affected Python packages and their versions: n/a

Actual behavior

see above

Expected behavior

see above

Steps to reproduce:

n/a

Logs

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions