in src/chromeDebugAdapter.ts [357:375]
public async disconnect(args: DebugProtocol.DisconnectArguments): Promise<void> {
const hadTerminated = this._hasTerminated;
// Disconnect before killing Chrome, because running "taskkill" when it's paused sometimes doesn't kill it
super.disconnect(args);
if ( (this._chromeProc || this._chromePID) && !hadTerminated) {
// Only kill Chrome if the 'disconnect' originated from vscode. If we previously terminated
// due to Chrome shutting down, or devtools taking over, don't kill Chrome.
if (coreUtils.getPlatform() === coreUtils.Platform.Windows && this._chromePID) {
this.killChromeOnWindows(this._chromePID);
} else if (this._chromeProc) {
logger.log('Killing Edge process');
this._chromeProc.kill('SIGINT');
}
}
this._chromeProc = null;
}