Added task to kill debugpy, sometimes vscode leave it behind causing problems during development

This commit is contained in:
arabcoders 2025-07-25 17:37:52 +03:00
parent c60c14d674
commit 438254c594
3 changed files with 31 additions and 11 deletions

19
.vscode/launch.json vendored
View file

@ -1,7 +1,4 @@
{
// 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": [
{
@ -18,17 +15,17 @@
"cwd": "${workspaceFolder}/ui",
"env": {
"NUXT_API_URL": "http://localhost:8081/api/",
"NUXT_PUBLIC_WSS": ":8081/",
"NUXT_PUBLIC_WSS": ":8081/"
},
"console": "internalConsole",
"outputCapture": "std",
"outputCapture": "std"
},
{
"name": "Python: main.py",
"name": "Python: main.py ",
"type": "debugpy",
"request": "launch",
"program": "app/main.py",
"console": "internalConsole",
"console": "integratedTerminal",
"justMyCode": true,
"env": {
"YTP_CONFIG_PATH": "${workspaceFolder}/var/config",
@ -36,7 +33,9 @@
"YTP_TEMP_PATH": "${workspaceFolder}/var/tmp",
"PYDEVD_DISABLE_FILE_VALIDATION": "1",
"YTP_IGNORE_UI": "true"
}
},
"subProcess": true,
"postDebugTask": "kill-debugpy"
},
{
"name": "Node: Generate UI",
@ -65,14 +64,14 @@
"YTP_CONFIG_PATH": "${workspaceFolder}/var/config",
"YTP_DOWNLOAD_PATH": "${workspaceFolder}/var/downloads",
"YTP_TEMP_PATH": "${workspaceFolder}/var/tmp",
"YTP_LOG_LEVEL": "DEBUG",
"YTP_LOG_LEVEL": "DEBUG"
}
},
{
"name": "Python: Attach To Process",
"type": "debugpy",
"request": "attach",
"processId": "${command:pickProcess}",
"processId": "${command:pickProcess}"
},
{
"name": "Python: Attach To Container",

22
.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,22 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "kill-debugpy",
"type": "shell",
"command": "pkill -f debugpy || true",
"problemMatcher": [],
"presentation": {
"echo": false,
"reveal": "never",
"focus": false,
"panel": "dedicated",
"showReuseMessage": false,
"clear": false
},
"runOptions": {
"runOn": "folderOpen"
}
}
]
}

View file

@ -171,7 +171,6 @@ class Main:
self._app,
host=host,
port=port,
reuse_port="win32" != sys.platform,
loop=asyncio.get_event_loop(),
access_log=HTTP_LOGGER,
print=started,