Build of Visual Studio Code - Insiders: 1.47.0-insider Build of python-insider: 2020.7.92197-dev
the breakpoint can be hit and contiune pressing F5 , it should hit the breakpoint again.
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.
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 <workspace of windows> <user of ubuntu>@<IP of ubuntu>:<workspace of ubuntu> 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.