skip to Main Content

I press F5 to debug a VSCode extension and VSCode will open a new window that will contain the extension. The extension will open a new VSCode window to open a specific project. But this new VSCode window didn’t contain the extension and I can’t debug it anymore. What can I do? đŸ˜©

2

Answers


  1. Not sure if you are looking for a specific extension. If you have already installed the debugger extension, Try to uninstall/reinstall.

    Login or Signup to reply.
  2. Your automatically generated extension launch configuration should look like this:

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Run Extension",
                "type": "extensionHost",
                "request": "launch",
                "runtimeExecutable": "${execPath}",
                "args": [
    
                    "${workspaceFolder}/../OneDrive/Test Bed",     // add the path here 
    
                    "--extensionDevelopmentPath=${workspaceFolder}"
                ]
            },
            {
                "name": "Extension Tests",
                "type": "extensionHost",
                "request": "launch",
                "runtimeExecutable": "${execPath}",
                "args": [
                    "--extensionDevelopmentPath=${workspaceFolder}",
                    "--extensionTestsPath=${workspaceFolder}/test/suite/index"
                ]
            }
        ]
    }
    

    You see in the Run Extension configuration that I added a path from the extension’s ${workspaceFolder} up one level and then into my OneDrive folder to another folder named Test Bed. That Test Bed folder will be opened in the first ExtensionHost window that is opened when you F5 and you can debug the extension using that folder immediately.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search