Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Attach to Docker",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 12345
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/code"
}
]
}
]
}
3 changes: 2 additions & 1 deletion requirements-dev.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
-c requirements.txt
debugpy # for vscode debugging
django-debug-toolbar
pydevd-pycharm==243.22562.180 # pinned to appropriate version for current pycharm
pydevd-pycharm==243.26053.29 # pinned to appropriate version for current pycharm
4 changes: 3 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ asgiref==3.8.1
# via
# -c ./requirements.txt
# django
debugpy==1.8.13
# via -r ./requirements-dev.in
django==4.2.16
# via
# -c ./requirements.txt
# django-debug-toolbar
django-debug-toolbar==4.4.6
# via -r ./requirements-dev.in
pydevd-pycharm==243.22562.180
pydevd-pycharm==243.26053.29
# via -r ./requirements-dev.in
sqlparse==0.5.1
# via
Expand Down
7 changes: 7 additions & 0 deletions vscode_debugger.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
def set_trace():
import debugpy

# Listen on all interfaces at port 5678
debugpy.listen(("172.17.0.1", 12345))
print("Waiting for debugger to attach...")
debugpy.wait_for_client() # Optional: pause execution until VS Code attaches