Press F5 does not hit breakpoint in remote debug.
zhouwangyang opened this issue · 1 comments
Environment data
Build of Visual Studio Code - Insiders: 1.47.0-insider
Build of python-insider: 2020.7.92197-dev
Actual behavior
the breakpoint can be hit and contiune pressing F5 , it should hit the breakpoint again.
Expected behavior
the breakpoint can be hit in the first time, but if continue pressing F5, the bp can not be hit and print all the result directly.
Steps to reproduce:
- Create python file named remote_debugging.py, enter content as following and set breakpoint in the sencond line:
for i in range(1, 10, 2):
print (i)
print('demo done.')
2.Copy this file to ubuntu which should include ptvsd installed with same version as current machine
a. install putty ( https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
b. paste the IP of ubuntu
c. input user and pwd of ubuntu
d. install ptvsd in ubuntu (pip install ptvsd)
e. find pscp.exe in PUTTY(C:\Program Files\PUTTY)
f. copy pscp.exe in C:\Windows\System32
g. open cmd and input below command:
pscp @:
3. Execute python file in ubuntu:
a. python –m ptvsd --host 0.0.0.0 --port 5678 --wait remote_debugging.py
4.Select configuration "Python: attach", set the host value with IP of ubuntu/other windows
5.Press F5 to run the code
Please try this with https://github.com/microsoft/debugpy, and if you are still having problems, open an issue in that repo.