Skip to content

Commit 7a5f653

Browse files
authored
make debug help dialog when context more specific (microsoft#224889)
make when more specific for debug help dialog
1 parent f31786e commit 7a5f653

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,20 @@ import { localize } from 'vs/nls';
1414
import { ICommandService } from 'vs/platform/commands/common/commands';
1515
import { IViewsService } from 'vs/workbench/services/views/common/viewsService';
1616
import { AccessibilityHelpNLS } from 'vs/editor/common/standaloneStrings';
17+
import { FocusedViewContext, SidebarFocusContext } from 'vs/workbench/common/contextkeys';
18+
import { BREAKPOINTS_VIEW_ID, CALLSTACK_VIEW_ID, LOADED_SCRIPTS_VIEW_ID, VARIABLES_VIEW_ID, WATCH_VIEW_ID } from 'vs/workbench/contrib/debug/common/debug';
1719

1820
export class RunAndDebugAccessibilityHelp implements IAccessibleViewImplentation {
1921
priority = 120;
2022
name = 'runAndDebugHelp';
21-
when = ContextKeyExpr.equals('activeViewlet', 'workbench.view.debug');
23+
when = ContextKeyExpr.or(
24+
ContextKeyExpr.and(ContextKeyExpr.equals('activeViewlet', 'workbench.view.debug'), SidebarFocusContext),
25+
ContextKeyExpr.equals(FocusedViewContext.key, VARIABLES_VIEW_ID),
26+
ContextKeyExpr.equals(FocusedViewContext.key, WATCH_VIEW_ID),
27+
ContextKeyExpr.equals(FocusedViewContext.key, CALLSTACK_VIEW_ID),
28+
ContextKeyExpr.equals(FocusedViewContext.key, LOADED_SCRIPTS_VIEW_ID),
29+
ContextKeyExpr.equals(FocusedViewContext.key, BREAKPOINTS_VIEW_ID)
30+
);
2231
type: AccessibleViewType = AccessibleViewType.Help;
2332
getProvider(accessor: ServicesAccessor) {
2433
return new RunAndDebugAccessibilityHelpProvider(accessor.get(ICommandService), accessor.get(IViewsService));

0 commit comments

Comments
 (0)