add debugpy snippet to vscode
All checks were successful
Reese's Arch Toolbox / build-and-push-arch-toolbox (push) Successful in 42m11s

This commit is contained in:
2025-03-07 11:40:26 -05:00
parent 2a421392b1
commit fb5ac88686

19
.vscode/vscode.md vendored
View File

@@ -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)