What is the proper way to debug an npm script using vscode?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've got an npm script that I'm trying to debug. I use vscode so I thought I'd create a debug configuration and step through it with the debugger. My npm script look is: "scripts": { ... "dev": "node tasks/runner.js", } So I created the following debug config: { "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Launch Program", "runtimeExecutable": "npm", "cwd": "${workspaceRoot}", "runtimeArgs": [ "run", "dev" ], "port": 5858, "stopOnEntry": true } ] } And when I fire it the script runs, but vscode is