Search code examples
visual-studio-codevscode-extensionsvscode-debuggervscode-remote

No debugger in VS code extension tests


I need to debug unit tests for an extension for VS Code but am not able to set any breakpoints. They are skipped all together when running tests, yet work when running the extension in debug mode.

Steps to reproduce:

  1. I cloned https://github.com/microsoft/vscode-extension-samples.
  2. code helloworld-test-example
  3. run npm install and put random breaking points in the test.
  4. When running the extension tests, the breaking points are not having any effect.

before running ext. tests

after running ext. tests

Any help will be appreciated a lot!


Solution

  • This might be an issue with Mac OS. I am able to debug with other IDE's when VS Code is closed. Seems that the second instance of VS Code is the issue when debugging with VS Code.

    I replicated these steps on 2 mac OS systems, both with fresh installs and no other activated plugins.