私信  •  关注

thanos.a

thanos.a 最近回复了
2 年前
回复了 thanos.a 创建的主题 » VS代码启动以调试Redis队列工作程序

通过反复试验,我找到了以下解决方案:

  1. 在中创建任务 tasks.json 文件
  2. 在现有数据库中添加“启动前任务” launch.json 引用任务的配置

注意:我还更新了版本。

任务。json

{
    "version": "2.0.0",
    "tasks": [
            {
            "label": "Redis Queue",
            "command": "./dequeue.sh",
            "type": "shell",
            "options": {"cwd": "${workspaceFolder}"}
        }
    ]
}

发射json

{
    "version": "0.2.0",
    "configurations": [

        {
            "name": "API",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/src/app/run.py",
            "console": "integratedTerminal",
            "cwd": "${workspaceFolder}/src/app",
            "preLaunchTask": "Redis Queue"
        }
    ]
}