From 50a0945d8de129472b154fa514ba5328897d3be1 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Wed, 13 Jul 2016 01:17:23 +0200 Subject: [PATCH] enable 'Restart Frame' only for participating debug adapters --- .../workbench/parts/debug/electron-browser/debugViewer.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts index 30f4b6480afde..e229453122654 100644 --- a/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts +++ b/src/vs/workbench/parts/debug/electron-browser/debugViewer.ts @@ -281,7 +281,7 @@ export class CallStackController extends BaseDebugController { export class CallStackActionProvider implements renderer.IActionProvider { - constructor( @IInstantiationService private instantiationService: IInstantiationService) { + constructor( @IInstantiationService private instantiationService: IInstantiationService, @debug.IDebugService private debugService: debug.IDebugService) { // noop } @@ -310,7 +310,10 @@ export class CallStackActionProvider implements renderer.IActionProvider { actions.push(this.instantiationService.createInstance(debugactions.PauseAction, debugactions.PauseAction.ID, debugactions.PauseAction.LABEL)); } } else if (element instanceof model.StackFrame) { - actions.push(this.instantiationService.createInstance(debugactions.RestartFrameAction, debugactions.RestartFrameAction.ID, debugactions.RestartFrameAction.LABEL)); + const caps = this.debugService.getActiveSession().configuration.capabilities; + if (typeof caps.supportsRestartFrame === 'boolean' && caps.supportsRestartFrame) { + actions.push(this.instantiationService.createInstance(debugactions.RestartFrameAction, debugactions.RestartFrameAction.ID, debugactions.RestartFrameAction.LABEL)); + } } return TPromise.as(actions);