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}"]
}
]
}
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
This error occurred because I had opened the parent folder of the extension rather than the folder of the extension itself.
This is the
launch.json
I use for theme extensions