Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger connection lost after executing "vscode.openFolder" command #87

Closed
alberto-bc opened this issue Mar 12, 2021 · 3 comments
Closed
Labels
*out-of-scope Posted issue is not in scope of VS Code

Comments

@alberto-bc
Copy link

VS Code version: 1.54.2
Platform: Windows 10
debugger_disconnects.zip

The project to reproduce is an extension generated using yo code

Steps to reproduce

  • Open the project
  • Run npm ci in a terminal window
  • Open extension.test.ts file
  • Place a breakpoint in line 15 (log statement)
  • Select Extension Test for debugging
  • Start debugging

Observed results
The breakpoint hits, then after a few seconds the debugger loses connection

Notice that if we remove the vscode.openFolder command everything works as expected.

@connor4312
Copy link
Member

This is an effect of the design of VS Code -- tests run in the extension host, and extensions hosts are per-workspace. Opening a different folder (i.e. a new workspace) will give you a new extension host and stop the run that was previously running tests.

@connor4312 connor4312 added the *out-of-scope Posted issue is not in scope of VS Code label Mar 12, 2021
@alberto-bc
Copy link
Author

Is there a workaround for this? i.e. attach the debugger to the new extension host?

@connor4312
Copy link
Member

I don't believe there's any workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

2 participants