Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: --Steps to Reproduce: the test sample to "Run Extension Tests" window opens, and immediately closes. VS Code is orphaned in a debugging state until you manually stop it. Happens using both js-debug and node-debug <!-- Launch with to check. --Does this issue occur when all extensions are disabled?: N/A
Other than adding the stopDebugging API I haven't changed anything in VS Code. Could you please do a bisect for finding the regression. Thanks.
I cannot reproduce this on macOS... will try on Windows. no need to investigate for now...
I cannot reproduce on macOS and Windows. Does problem reproduce after reboot?
I can repro this on OSX and Windows, but discovered this is only when the web worker extension host is enabled cc Removing since this won't affect end users yet
great find.
I forgot about this issue and hit it again today until I realized what was happening This is not related to debugging, since it also happens when I run my tests from the command line.
I ran into this yesterday and spent a lot of time on this not realizing that I had webWorker EH on, synced to all my machines. As discussed the other day, instead of "extensions.webWorker" being a setting it should be a command line option. That way it can be defined in launch configs and will result in a nicer development experience.
I fully agree. Ran into the same issue... My current solution to avoid having "extensions.webWorker" spread like a virus is to define it as a workspace setting.
The problem is that we have two distinct extension hosts (the nodejs and the web worker one), and they both believe they are solely responsible for running extension tests. In this case, the web worker extension host begins executing, attempts to load the , which throws since it doesn't run correctly in a web worker, so it communicates to the main thread that it finished with running the extension tests and that it should exit with a certain exit code. In the meantime, the nodejs extension host also loads the same and proceeds executing the tests. But the renderer process exits on the first call to exit, which comes from the web worker extension host. So it appears that introduced via from is not sufficient anymore, since both extension hosts see that there is an extension test to execute on the protocol:
thank you

Discussion:
import { IExtHostTerminalService } from 'vs/workbench/api/common/extHostTerminalService'; import { Emitter, Event } from 'vs/base/common/event'; import { IExtensionActivationHost, checkActivateWorkspaceContainsExtension } from 'vs/workbench/api/common/shared/workspaceContains'; <ins> import { isEqualOrParent } from 'vs/base/common/extpath'; import { isLinux } from 'vs/base/common/platform'; </ins> interface ITestRunner { /** Old test runner API, as exported from `vscode/lib/testrunner` */

const extensionTestsPath = originalFSPath(extensionTestsLocationURI); <ins> let knowsExtension = false; for (const extension of this._registry.getAllExtensionDescriptions()) { if (extension.extensionLocation.scheme === Schemas.file) { const extensionPath = originalFSPath(extension.extensionLocation); if (isEqualOrParent(extensionTestsPath, extensionPath, !isLinux)) { knowsExtension = true; } } } if (!knowsExtension) { return Promise.resolve(undefined); } </ins> // Require the test runner via node require from the provided path let testRunner: ITestRunner | INewTestRunner | undefined; let requireError: Error | undefined;