Welcome to TWIL, your weekly dose of micro-learning from the tech trenches at Cuttlesoft! In this post, Frank untangles the intricacies of setting up Multiple Configs for the VS Code Debugger, essential for efficiently managing complex project components like Django and Celery in your development environment. Discover Frank's tips for the ideal VSCode setup, allowing you to simultaneously debug different processes with ease—a true game-changer for developers looking for a streamlined workflow. Dive into this week's learning and elevate your debugging skills with precision!
Define Multiple Configs for VS Code Debugger
Define multiple process configs in launch.json
so you can debug several components of a project's stack (e.g. django
and celery
)
{
"version": "0.2.0",
"configurations": [
{
"name": "[django] runserver",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/manage.py",
"args": ["runserver"],
"django": true,
"justMyCode": false
},
{
"name": "[celery] worker",
"type": "python",
"request": "launch",
"module": "celery",
"console": "integratedTerminal",
"args": ["-A", "myapp", "worker", "-l", "debug", "-E"]
}
]
}
Note the [celery] worker
defines a process to run in the VS Code terminal which makes it a better stating place for arbitrary shell commands.
- VS Code