如何在VSCode中调试同时运行其他npm脚本的npm脚本?

时间:2019-09-04 22:39:30

标签: node.js npm visual-studio-code

我的npm脚本紧密联系在一起,如下所示

"scripts": {
    "start": "concurrently --raw \"npm run start-client\" \"npm run start-server\" \"npm run content-json\"",
    "start-client": "node scripts/start.js",
    "start-server": "NODE_ENV=development babel-node index.js",
    "content-json": "node scripts/content-json.js"
}

我尝试使用以下命令添加新的npm启动配置,但这也无济于事

 {
        "type": "node",
        "request": "launch",
        "name": "Launch via NPM",
        "runtimeExecutable": "npm",
        "runtimeArgs": [
            "run-script",
            "start",
            "--",
            "--inspect-brk=9229"
        ],
        "port": 9229
    }

我想使用原始的npm启动脚本运行调试器。

0 个答案:

没有答案