-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
VS Code terminates if when clicking Debug -> Start without Debugging for extension tests #81090
Comments
@DanTup nice catch, thanks for filling this. I can reproduce. |
It hasn't always been this way - it used to print a message in the console like "running tests from the command line is only possible when no instance of VS Code is open" (I always found the message amusing, since I wasn't running from the console - I guess it was triggered by not having the debugger attached - though honestly I don't understand why that limitation exists). I agree it's not a priority though, the impact is low (though it is a little frustrating for those of us when we do hit it :-)) |
I can repro this all the time. However I am pretty clueless who is closing the window. Trying to find out who calls electronService.closeWindow. Also produced no effect. @weinand @bpasero might you have ideas who might close the first window when debugging EH tests with NoDebug flag? |
I cannot reproduce, a new window opens with the extension being debugged. I tried insiders and out of sources, 😩 |
Oh this is running tests, yeah I see it... |
@isidorn seems to be this code: vscode/src/vs/workbench/services/extensions/electron-browser/extensionService.ts Line 555 in ff026e0
If you run code with
|
The problem is the definition of the environment flag
This flag should not become true when launching an extension (or its tests) from the debugger (even if "Start without Debugging" is used). But the condition The correct condition is |
Thanks! |
yo code
to generate the sample TypeScript extensionDebug
->Start Without Debugging
It used to output a message about not being able to run tests from the command line while an instance of VS Code is open (a slightly misleading message, and a frustrating limitation, but at least it was clear what happened). Now, VS Code just disappears as if it crashed. This seems like rather undesirable behaviour.
I often run things without the debugger when I know I won't be debugging (for various reasons) so out of habit I often hit Ctrl+F5. Having to restart VS Code seems like a high penalty for that mistake :-)
The text was updated successfully, but these errors were encountered: