Skip to content

Commit 1abe744

Browse files
committed
Add rough vscode debugging support
1 parent 6ffe6a5 commit 1abe744

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

requirements-dev.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
-c requirements.txt
22
django-debug-toolbar
33
pydevd-pycharm==243.22562.180 # pinned to appropriate version for current pycharm
4+
debugpy # for vscode debugging

vscode_debugger.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def set_trace():
2+
import debugpy
3+
4+
# Listen on all interfaces at port 5678
5+
debugpy.listen(("172.17.0.1", 12345))
6+
print("Waiting for debugger to attach...")
7+
debugpy.wait_for_client() # Optional: pause execution until VS Code attaches

0 commit comments

Comments
 (0)