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

Attach debugger to a local process #1078

Closed
DonJayamanne opened this issue Mar 14, 2018 · 14 comments
Closed

Attach debugger to a local process #1078

DonJayamanne opened this issue Mar 14, 2018 · 14 comments
Assignees
Labels
area-debugging feature-request Request for new features or functionality meta Issue that is tracking an overall project

Comments

@DonJayamanne
Copy link

No description provided.

@DonJayamanne DonJayamanne added feature-request Request for new features or functionality needs PR area-debugging labels Mar 14, 2018
@brettcannon brettcannon changed the title As support for attaching to a local process in experimental debugger Add support for attaching to a local process in experimental debugger Mar 16, 2018
@DonJayamanne DonJayamanne self-assigned this Mar 20, 2018
@DonJayamanne
Copy link
Author

I managed to get this working in PTVSD, won't be working on this as it's not a priority, unless that changes.
Will end up implementing in ptvsd as it is required for VS.

@DonJayamanne DonJayamanne changed the title Add support for attaching to a local process in experimental debugger Attach debugger to a local process Sep 20, 2018
@DonJayamanne
Copy link
Author

Support has been added in PTVSD.

@Tadaboody

This comment has been minimized.

@DonJayamanne

This comment has been minimized.

@gabrielamartinezatwizeline

Hi, @DonJayamanne is this working now ? thanks!

@ShenChen93
Copy link

Hi, @DonJayamanne
I have two questions here. First, can you provide an estimation of the date when it can be finished? Second, when PID is supported, do we still need to inject ptvsd package? Since this one is not a good design as we need to add IDE specific code into our own script. Is there any possible you can do it just like Pycharm, and run ptvsd_enable/wait automatically in background? Looks forward to hearing from you soon. Thanks.

@DonJayamanne DonJayamanne removed their assignment Dec 6, 2018
@eraoul
Copy link

eraoul commented May 5, 2019

Is anyone working on this feature? I just tried to connect to a locally running python script and was surprised when I figured out that this hasn't been implemented. Would love an ETA if it's on the roadmap.

@DonJayamanne
Copy link
Author

DonJayamanne commented May 6, 2019

If this feature is important please do upvote 👍 the issue so we can track the number of users interested in this and accordingly prioritize it in our sprints.
We do all of our planning on zenhub, you should be able to see it our plans for each Sprint in there.
In the interim, We welcome any contributions to the extension.
Finally this issue is not in the current Sprint.

@luabud
Copy link
Member

luabud commented Sep 11, 2019

@karthiknadig isn't this working now?

@karthiknadig
Copy link
Member

@luabud In ptvsd yes. But there is no UI support for this in the extension.

@cgtoolbox
Copy link

@luabud Hello, ptvsd works for me too, but I can't find a way to avoid adding special code for it in my script. Just like it works on Visual Studio python plugin. That'd be so handy ...

@luabud
Copy link
Member

luabud commented Sep 13, 2019

@DonJayamanne should we change this to track UI support in this extension, and add "needs spec"?

@DonJayamanne
Copy link
Author

Yes agreed we need a spec. It's fairly simple, you can look at how nodejs and c# support this (simple drop-down list of processes).

@luabud luabud added this to the FY20Q2 milestone Nov 19, 2019
@karthiknadig karthiknadig added the meta Issue that is tracking an overall project label Nov 20, 2019
@brettcannon brettcannon added needs PR and removed needs proposal Need to make some design decisions labels Jan 6, 2020
@ghost ghost removed the needs PR label Jan 15, 2020
@luabud
Copy link
Member

luabud commented Jan 16, 2020

This feature is under experiment, but for those who would like to try it out:

  1. Install the Insiders build. You can do this by opting in the Insiders Program, by opening the command palette (View > Command Palette...) and running "Python: Switch to Insiders Weekly Channel".
  2. Open the user settings file (in the command palette, run "Preferences: Open Settings (JSON)") and add this to it:
"python.experiments.optInto": [
        "PtvsdWheels37 - experiment"
    ],
  1. Now when you open the launch.json file and click to add a configuration, you can select "Python" and then "Attach using Process ID". If you don't have a launch.json file, you just need to start debugging (e.g. with F5) and then you'll see the same options below.

image

If you have any issues with it, please file a new issue here, filling the information in the template there.

We look forward to having this available to everyone soon 😊 then steps 1 and 2 won't be needed.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
@lock lock bot unassigned Anapo14 Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging feature-request Request for new features or functionality meta Issue that is tracking an overall project
Projects
None yet
Development

No branches or pull requests

10 participants