【问题标题】:"You don't have an extension for debugging 'JSON with Comments'" warning when debugging VS Code theme调试 VS Code 主题时出现“您没有用于调试 'JSON with Comments' 的扩展”警告
【发布时间】:2021-09-26 04:46:21
【问题描述】:

我生成了在 VS Code 中创建颜色主题所需的文件。我使用 generator-code 节点包做到了这一点。

My file structure is as follows

当我运行 VS Code 的调试器时,我收到this warning,它阻止调试器运行。

这是我的launch.json文件的内容供参考:

{
  "version": "0.2.0",
  "configurations": [
      {
          "name": "Extension",
          "type": "extensionHost",
          "request": "launch",
          "runtimeExecutable": "${execPath}",
          "args": [
              "--extensionDevelopmentPath=${workspaceFolder}"
          ],
          "outFiles": [
              "${workspaceFolder}/out/**/*.js"
          ],
      }
  ]
}

如果您想知道我在运行调试器时会发生什么,here's the moment 在我遇到此问题的教程中。

编辑:好吧,我通过删除文件并重新开始以某种方式规避了这个问题。我不确定是什么导致了之前的问题。

【问题讨论】:

    标签: debugging visual-studio-debugging vscode-debugger


    【解决方案1】:

    只有在打开 launch.json 文件时尝试启动调试器时才会出现此弹出窗口。切换到我的一个测试文件并启动调试器修复它

    【讨论】:

    • tasks.json 是另一个非常典型的打开会导致这种情况的文件。我尝试将其添加到您的答案中,但建议的编辑队列已满。
    【解决方案2】:

    当我的launch.json 不符合version + configurations 方案时出现此错误,我将configurations 的内容复制粘贴到文件中,而不是将其放入数组中。

    {
        "name": "Extension",
        "type": "extensionHost",
        "request": "launch",
        "runtimeExecutable": "${execPath}",
        "args": [
            "--extensionDevelopmentPath=${workspaceFolder}"
        ],
        "outFiles": [
            "${workspaceFolder}/out/**/*.js"
        ],
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-02-06
      • 1970-01-01
      • 2021-09-27
      • 1970-01-01
      • 2020-07-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多