提交 2a9a512e 编写于 作者: I isidor

debug: react on registration to update context keys

上级 44700f81
...@@ -99,6 +99,7 @@ export class ConfigurationManager implements IConfigurationManager { ...@@ -99,6 +99,7 @@ export class ConfigurationManager implements IConfigurationManager {
registerDebugAdapterFactory(debugTypes: string[], debugAdapterLauncher: IDebugAdapterFactory): IDisposable { registerDebugAdapterFactory(debugTypes: string[], debugAdapterLauncher: IDebugAdapterFactory): IDisposable {
debugTypes.forEach(debugType => this.debugAdapterFactories.set(debugType, debugAdapterLauncher)); debugTypes.forEach(debugType => this.debugAdapterFactories.set(debugType, debugAdapterLauncher));
this.debuggersAvailable.set(this.debugAdapterFactories.size > 0); this.debuggersAvailable.set(this.debugAdapterFactories.size > 0);
this._onDidRegisterDebugger.fire();
return { return {
dispose: () => { dispose: () => {
...@@ -425,7 +426,6 @@ export class ConfigurationManager implements IConfigurationManager { ...@@ -425,7 +426,6 @@ export class ConfigurationManager implements IConfigurationManager {
}); });
this.setCompoundSchemaValues(); this.setCompoundSchemaValues();
this._onDidRegisterDebugger.fire();
}); });
breakpointsExtPoint.setHandler((extensions, delta) => { breakpointsExtPoint.setHandler((extensions, delta) => {
......
...@@ -160,7 +160,7 @@ export class DebugService implements IDebugService { ...@@ -160,7 +160,7 @@ export class DebugService implements IDebugService {
this.toDispose.push(this.viewModel.onDidFocusSession(() => { this.toDispose.push(this.viewModel.onDidFocusSession(() => {
this.onStateChange(); this.onStateChange();
})); }));
this.toDispose.push(this.configurationManager.onDidSelectConfiguration(() => { this.toDispose.push(Event.any(this.configurationManager.onDidRegisterDebugger, this.configurationManager.onDidSelectConfiguration)(() => {
this.debugUx.set(!!(this.state !== State.Inactive || (this.configurationManager.selectedConfiguration.name && this.configurationManager.hasDebuggers())) ? 'default' : 'simple'); this.debugUx.set(!!(this.state !== State.Inactive || (this.configurationManager.selectedConfiguration.name && this.configurationManager.hasDebuggers())) ? 'default' : 'simple');
})); }));
this.toDispose.push(this.model.onDidChangeCallStack(() => { this.toDispose.push(this.model.onDidChangeCallStack(() => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册