0

I created and published a VSCode colour theme, using the debug feature to see what it would look like. Now, when I try to debug it, it gives me a "You don't have an extension for debugging 'JSON with comments' error.
I didn't change anything in the launch JSON file in between it working and now.

launch.json

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Launch Extension",
      "type": "extensionHost",
      "request": "launch",
      "args": ["--extensionDevelopmentPath=${workspaceFolder}"]
    }
  ]
}

file structure
screenshot of the file structure

I found this question, however, the user solved the problem by just deleting and restarting, which isn't ideal for me (as I have published it already and want to maintain it).

The accepted answer also suggests closing launch.json or tasks.json, however, the error still persists, even after restarting VSCode.

rioV8
  • 24,506
  • 3
  • 32
  • 49
LWB
  • 426
  • 1
  • 4
  • 16

2 Answers2

1

This is the launch.json I use for theme extensions

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Extension",
            "type": "extensionHost",
            "request": "launch",
            "runtimeExecutable": "${execPath}",
            "args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
            "stopOnEntry": false
        }
    ]
}
rioV8
  • 24,506
  • 3
  • 32
  • 49
0

This error occurred because I had opened the parent folder of the extension rather than the folder of the extension itself.

LWB
  • 426
  • 1
  • 4
  • 16