mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-15 07:41:11 +01:00
debug: shut down debug sessions if an extension host goes away (#187169)
Fixes #184552
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { DisposableStore, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { URI as uri, UriComponents } from 'vs/base/common/uri';
|
||||
import { IDebugService, IConfig, IDebugConfigurationProvider, IBreakpoint, IFunctionBreakpoint, IBreakpointData, IDebugAdapter, IDebugAdapterDescriptorFactory, IDebugSession, IDebugAdapterFactory, IDataBreakpoint, IDebugSessionOptions, IInstructionBreakpoint, DebugConfigurationProviderTriggerKind } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import {
|
||||
@@ -50,6 +50,11 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape, IDeb
|
||||
this._toDispose.add(debugService.getViewModel().onDidFocusSession(session => {
|
||||
this._proxy.$acceptDebugSessionActiveChanged(this.getSessionDto(session));
|
||||
}));
|
||||
this._toDispose.add(toDisposable(() => {
|
||||
for (const [handle, da] of this._debugAdapters) {
|
||||
da.fireError(handle, new Error('Extension host shut down'));
|
||||
}
|
||||
}));
|
||||
|
||||
this._debugAdapters = new Map();
|
||||
this._debugConfigurationProviders = new Map();
|
||||
|
||||
Reference in New Issue
Block a user