Skip to content

Instantly share code, notes, and snippets.

@victory-sokolov
Last active February 13, 2024 07:06
Show Gist options
  • Save victory-sokolov/c3763a225a00c50471976ebab0f54d53 to your computer and use it in GitHub Desktop.
Save victory-sokolov/c3763a225a00c50471976ebab0f54d53 to your computer and use it in GitHub Desktop.
VSCode debugging configs
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debugpy attach",
"type": "python",
"request": "attach",
"connect": {
"host": "0.0.0.0",
"port": 5678
}
},
{
"name": "Python: Django",
"type": "python",
"request": "launch",
"stopOnEntry": false,
"program": "${workspaceFolder}/manage.py",
"args": [
"runsslserver", // for https
//"runserver", // for http
"0.0.0.0:8000",
"--no-color",
"--noreload"
],
"env": {
"DJANGO_ENV": "local",
"DJANGO_SETTINGS_MODULE": "djangoblog.settings"
},
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput",
"DjangoDebugging"
],
"autoReload": {
"enable": true
},
"rules": [
{
"module": "module.settings",
"include": false
},
{
"path": "**/admin.py",
"include": false
}
],
"django": true,
"justMyCode": true,
"jinja": true,
},
{
"name": "Python: Celery",
"type": "python",
"request": "launch",
"module": "celery",
"console": "integratedTerminal",
"args": [
"-A",
"app_name",
"worker",
"-l",
"info",
"-P",
"solo",
],
"env": {
"DJANGO_ENV": "local"
},
}
]
}
{
"version": "0.2.0",
"configurations": [
{
"name": "(Windows) Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}\\out\\your-executable-location\\electron.exe",
"args": ["your-electron-project-path"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [
{"name": "ELECTRON_ENABLE_LOGGING", "value": "true"},
{"name": "ELECTRON_ENABLE_STACK_DUMPING", "value": "true"},
{"name": "ELECTRON_RUN_AS_NODE", "value": ""},
],
"externalConsole": false,
"sourceFileMap": {
"o:\\": "${workspaceFolder}",
},
},
]
}
@victory-sokolov
Copy link
Author

Run debugpy in the console

python -m debugpy --listen 0.0.0.0:5678 manage.py test app.test_file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment