Use remote attach to debug a python debugpy session
I want this to be a single click, i.e. I don't want to run the debugpy session first and then click on the "Run and Debug" button.
The idea is inspired from this blog post
Thanks for your issue report, that depends on how vscode handles the attach, if the problem persists could you create an issue in the vscode repository? thank you
What I really want to do:
debugpy
sessiondebugpy
session first and then click on the "Run and Debug" button. The idea is inspired from this blog postWhat I did
In tasks.json file
The shell file (
py-start-debug
) - simplified:What happens:
The debug session works. Sometimes in the first attempt. Sometimes in the second attempt.
Debugging working in First attempt:
Debugging working in Second Attempt:
Logs:
First Attempt Success.zip Second Attempt Success.zip
Test Code:
source.zip
Question:
Why would it work sometimes in the first attempt itself and why would it work only in the second attempt?