add debugpy snippet to vscode
All checks were successful
Reese's Arch Toolbox / build-and-push-arch-toolbox (push) Successful in 42m11s
All checks were successful
Reese's Arch Toolbox / build-and-push-arch-toolbox (push) Successful in 42m11s
This commit is contained in:
19
.vscode/vscode.md
vendored
19
.vscode/vscode.md
vendored
@@ -1,6 +1,7 @@
|
||||
# VSCODE Configuration
|
||||
|
||||
- [VSCODE Configuration](#vscode-configuration)
|
||||
- [Debugpy Snippet](#debugpy-snippet)
|
||||
- [Fix Paste (if ctrl+v not working)](#fix-paste-if-ctrlv-not-working)
|
||||
- [Shell](#shell)
|
||||
- [Fonts](#fonts)
|
||||
@@ -8,6 +9,24 @@
|
||||
- [Extensions](#extensions)
|
||||
- [Continue](#continue)
|
||||
|
||||
## Debugpy Snippet
|
||||
|
||||
Use this to add debugging to any project
|
||||
|
||||
```python
|
||||
# Listens on 5678
|
||||
# Only runs if ACTIVATE_DEBUGPY=true is set
|
||||
if os.getenv("ACTIVATE_DEBUGPY", "").lower() == "true":
|
||||
try:
|
||||
import debugpy
|
||||
debugpy.listen(("0.0.0.0", 5678))
|
||||
print("Waiting for client on 5678...")
|
||||
debugpy.wait_for_client()
|
||||
print("Client connected")
|
||||
except Exception as e:
|
||||
print("DEBUG ERROR: " + str(e))
|
||||
```
|
||||
|
||||
## Fix Paste (if ctrl+v not working)
|
||||
|
||||
Add to user keyboard settings (json)
|
||||
|
||||
Reference in New Issue
Block a user