skip to Main Content

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.

2

Answers


  1. Chosen as BEST ANSWER

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


  2. 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
            }
        ]
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search