Skip to content

Commit 2a9a512

Browse files
committed
debug: react on registration to update context keys
1 parent 44700f8 commit 2a9a512

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/vs/workbench/contrib/debug/browser/debugConfigurationManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ export class ConfigurationManager implements IConfigurationManager {
9999
registerDebugAdapterFactory(debugTypes: string[], debugAdapterLauncher: IDebugAdapterFactory): IDisposable {
100100
debugTypes.forEach(debugType => this.debugAdapterFactories.set(debugType, debugAdapterLauncher));
101101
this.debuggersAvailable.set(this.debugAdapterFactories.size > 0);
102+
this._onDidRegisterDebugger.fire();
102103

103104
return {
104105
dispose: () => {
@@ -425,7 +426,6 @@ export class ConfigurationManager implements IConfigurationManager {
425426
});
426427

427428
this.setCompoundSchemaValues();
428-
this._onDidRegisterDebugger.fire();
429429
});
430430

431431
breakpointsExtPoint.setHandler((extensions, delta) => {

src/vs/workbench/contrib/debug/browser/debugService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export class DebugService implements IDebugService {
160160
this.toDispose.push(this.viewModel.onDidFocusSession(() => {
161161
this.onStateChange();
162162
}));
163-
this.toDispose.push(this.configurationManager.onDidSelectConfiguration(() => {
163+
this.toDispose.push(Event.any(this.configurationManager.onDidRegisterDebugger, this.configurationManager.onDidSelectConfiguration)(() => {
164164
this.debugUx.set(!!(this.state !== State.Inactive || (this.configurationManager.selectedConfiguration.name && this.configurationManager.hasDebuggers())) ? 'default' : 'simple');
165165
}));
166166
this.toDispose.push(this.model.onDidChangeCallStack(() => {

0 commit comments

Comments
 (0)