VS Code调试器未运行:属性“program”不存在

问题描述 投票:1回答:2

经过数月的使用,VS Code调试器突然停止工作。我试图在链接List Intersection.js的文件上使用它,并收到以下错误:

Attribute 'program' does not exist ('/path/to/linkedListIntersection.js'). 

我的launch.json文件是

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "node",
      "request": "launch",
      "name": "Launch Program",
      "program": "${workspaceFolder}/path/to/linkedListIntersection.js"
    }
  ]
}

关于similar问题的答案主要是纠正指定的文件,但我只有一个文件。

另外,每当我尝试在任何文件上启动调试会话时,我都会收到上述错误。奇怪的是,错误总是指linkedListIntersection.js,即使我尝试在另一个文件中启动调试。

node.js visual-studio
2个回答
2
投票

我设法通过删除linkedListIntersection.js launch.json文件来解决这个问题。


2
投票

只需从launch.json删除.vscode文件。它对我有用。

© www.soinside.com 2019 - 2024. All rights reserved.