无法在VS Code中进行调试

时间:2020-05-23 20:33:01

标签: visual-studio-code vscode-debugger

我是VS Code的新手,并且正在关注the official tutorial,以学习如何进行调试。但是,它只是行不通的。首先,UI看起来有所不同。它显示“运行”

enter image description here

与视频中的UI外观相比,显示了“ DEBUG”

enter image description here

此外,我添加了一个断点并点击绿色的开始按钮,它永远不会停止

这是launch.json文件: enter image description here

我应该怎么做才能使调试器正常工作?

1 个答案:

答案 0 :(得分:1)

您需要在检查模式下运行node

在终端/控制台中,执行以下操作:

node --inspect app.js