提交 6a25d333 编写于 作者: I isidor

fixes #62158

上级 130f7a7e
...@@ -22,6 +22,7 @@ import { openBreakpointSource } from 'vs/workbench/parts/debug/browser/breakpoin ...@@ -22,6 +22,7 @@ import { openBreakpointSource } from 'vs/workbench/parts/debug/browser/breakpoin
import { INotificationService } from 'vs/platform/notification/common/notification'; import { INotificationService } from 'vs/platform/notification/common/notification';
import { InputFocusedContext } from 'vs/platform/workbench/common/contextkeys'; import { InputFocusedContext } from 'vs/platform/workbench/common/contextkeys';
import { ServicesAccessor } from 'vs/editor/browser/editorExtensions'; import { ServicesAccessor } from 'vs/editor/browser/editorExtensions';
import { PanelFocusContext } from 'vs/workbench/browser/parts/panel/panelPart';
export const ADD_CONFIGURATION_ID = 'debug.addConfiguration'; export const ADD_CONFIGURATION_ID = 'debug.addConfiguration';
export const TOGGLE_INLINE_BREAKPOINT_ID = 'editor.debug.action.toggleInlineBreakpoint'; export const TOGGLE_INLINE_BREAKPOINT_ID = 'editor.debug.action.toggleInlineBreakpoint';
...@@ -237,7 +238,7 @@ export function registerCommands(): void { ...@@ -237,7 +238,7 @@ export function registerCommands(): void {
id: TOGGLE_INLINE_BREAKPOINT_ID, id: TOGGLE_INLINE_BREAKPOINT_ID,
title: nls.localize('addInlineBreakpoint', "Add Inline Breakpoint") title: nls.localize('addInlineBreakpoint', "Add Inline Breakpoint")
}, },
when: ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, EditorContextKeys.writable, EditorContextKeys.editorTextFocus), when: ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, PanelFocusContext.toNegated(), EditorContextKeys.editorTextFocus),
group: 'debug', group: 'debug',
order: 1 order: 1
}); });
......
...@@ -17,6 +17,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; ...@@ -17,6 +17,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { openBreakpointSource } from 'vs/workbench/parts/debug/browser/breakpointsView'; import { openBreakpointSource } from 'vs/workbench/parts/debug/browser/breakpointsView';
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { PanelFocusContext } from 'vs/workbench/browser/parts/panel/panelPart';
export const TOGGLE_BREAKPOINT_ID = 'editor.debug.action.toggleBreakpoint'; export const TOGGLE_BREAKPOINT_ID = 'editor.debug.action.toggleBreakpoint';
class ToggleBreakpointAction extends EditorAction { class ToggleBreakpointAction extends EditorAction {
...@@ -103,7 +104,7 @@ class RunToCursorAction extends EditorAction { ...@@ -103,7 +104,7 @@ class RunToCursorAction extends EditorAction {
id: 'editor.debug.action.runToCursor', id: 'editor.debug.action.runToCursor',
label: nls.localize('runToCursor', "Run to Cursor"), label: nls.localize('runToCursor', "Run to Cursor"),
alias: 'Debug: Run to Cursor', alias: 'Debug: Run to Cursor',
precondition: ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, CONTEXT_DEBUG_STATE.isEqualTo('stopped'), EditorContextKeys.editorTextFocus), precondition: ContextKeyExpr.and(CONTEXT_IN_DEBUG_MODE, PanelFocusContext.toNegated(), CONTEXT_DEBUG_STATE.isEqualTo('stopped'), EditorContextKeys.editorTextFocus),
menuOpts: { menuOpts: {
group: 'debug', group: 'debug',
order: 2 order: 2
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册