I am trying to create a launch configuration on the VS-code so I can debug a Redis Queue background worker.
The existing launch.js contains:
{
"version": "0.2.0",
"configurations": [
{
"name": "API",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/app/run.py",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/src/app"
}
]
}
The commands to launch the Redis Queue worker from a regular bash terminal are:
cd /home/user/api/src/app
source env/bin/activate
rq worker --url redis://localhost:2179
What could be the proper launch.js configuration, so that I can launch and debug the Redis Queue worker using the VS code ?
As of now I ended up to the following:
{
"name": "Redis Queue Worker",
"type": "python",
"request": "launch",
"program": "rq",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/src/app",
"args": ["worker", "--url", "redis://localhost:2179"]
}
which gives me the following error:
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/api/src/app/rq'