Created
August 25, 2021 06:29
-
-
Save gyng/4c1a94bd88213527d0de2e42208b8149 to your computer and use it in GitHub Desktop.
Python debuggin for vscode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import debugpy | |
try: | |
debugpy.listen(("0.0.0.0", 5678)) | |
debugpy.wait_for_client() | |
except RuntimeError: | |
pass | |
breakpoint() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Attach debugger", | |
"type": "python", | |
"request": "attach", | |
"connect": { | |
"host": "localhost", | |
"port": 5678 | |
}, | |
"pathMappings": [ | |
{ | |
"localRoot": "${workspaceFolder}", | |
"remoteRoot": "/app" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Attach debugger", | |
"type": "python", | |
"request": "attach", | |
"connect": { | |
"host": "localhost", | |
"port": 5678 | |
}, | |
"pathMappings": [ | |
{ | |
"localRoot": "${workspaceFolder}", | |
"remoteRoot": "/app" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment