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

Trouble attaching to a live session #2146

Closed
brettcannon opened this issue Jul 12, 2018 · 1 comment · Fixed by #2174
Closed

Trouble attaching to a live session #2146

brettcannon opened this issue Jul 12, 2018 · 1 comment · Fixed by #2174
Assignees
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@brettcannon
Copy link
Member

/cc @ElaineDi

Install ptvsd via below command:
python.exe -m pip install ptvsd --pre
Add new python file named attach_test.py, enter some code like below:

import ptvsd 
ptvsd.enable_attach() 
ptvsd.wait_for_attach() 
for i in range(1, 10, 2): 
    print (i) 
print('demo done.')

Run attach_test.py and wait for attaching:
Run c:\python\python36\Python attach_test.py
Select debugging configuration "Python: Attach"
Press F5 to start debugging, ensure:
Hit the break point
Inspect variables
Step into/out/over, etc..

getimage

getimage 1

@brettcannon brettcannon added bug Issue identified by VS Code Team member as probable bug needs verification area-debugging labels Jul 12, 2018
@DonJayamanne DonJayamanne self-assigned this Jul 12, 2018
@DonJayamanne
Copy link

Default port in PTVSD is 5678.
We should probably change the default port in launch.json to 5678.

@DonJayamanne DonJayamanne modified the milestones: Jul 2018, Aug 2018 Jul 12, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants