2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-08 06:15:26 +00:00

feat: debug workers in vscode devcontainers

[skip travis]
This commit is contained in:
Revant Nandgaonkar 2020-05-24 05:33:41 +05:30
parent 4cdec4d47d
commit ed03259c17
2 changed files with 47 additions and 3 deletions

View File

@ -5,7 +5,7 @@
"version": "0.2.0",
"configurations": [
{
"name": "Bench",
"name": "Bench Web",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
@ -17,6 +17,48 @@
"env": {
"DEV_SERVER": "1"
}
}
},
{
"name": "Bench Default Worker",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": [
"frappe", "worker", "--queue", "default"
],
"pythonPath": "${workspaceFolder}/frappe-bench/env/bin/python",
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
{
"name": "Bench Short Worker",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": [
"frappe", "worker", "--queue", "short"
],
"pythonPath": "${workspaceFolder}/frappe-bench/env/bin/python",
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
{
"name": "Bench Long Worker",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/frappe-bench/apps/frappe/frappe/utils/bench_helper.py",
"args": [
"frappe", "worker", "--queue", "long"
],
"pythonPath": "${workspaceFolder}/frappe-bench/env/bin/python",
"cwd": "${workspaceFolder}/frappe-bench/sites",
"env": {
"DEV_SERVER": "1"
}
},
]
}
}

View File

@ -173,6 +173,8 @@ This command starts all processes with the exception of Redis (which is already
You can now login with user `Administrator` and the password you choose when creating the site, if you followed this guide's unattended install that password is going to be `admin`.
To debug workers, skip starting worker with honcho and start it with VSCode debugger.
## Developing using the interactive console
You can launch a simple interactive shell console in the terminal with: