Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
0738ae2f
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0738ae2f
编写于
7月 19, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
menu: move debug menu registration to debug.contribution
上级
e90faf1f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
190 addition
and
191 deletion
+190
-191
src/vs/workbench/browser/parts/menubar/menubar.contribution.ts
...s/workbench/browser/parts/menubar/menubar.contribution.ts
+0
-180
src/vs/workbench/parts/debug/browser/debugCommands.ts
src/vs/workbench/parts/debug/browser/debugCommands.ts
+7
-5
src/vs/workbench/parts/debug/browser/debugEditorActions.ts
src/vs/workbench/parts/debug/browser/debugEditorActions.ts
+6
-3
src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
...kbench/parts/debug/electron-browser/debug.contribution.ts
+176
-1
src/vs/workbench/workbench.main.ts
src/vs/workbench/workbench.main.ts
+1
-2
未找到文件。
src/vs/workbench/browser/parts/menubar/menubar.contribution.ts
浏览文件 @
0738ae2f
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
import
*
as
nls
from
'
vs/nls
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
{
MenuRegistry
,
MenuId
}
from
'
vs/platform/actions/common/actions
'
;
import
{
MenuRegistry
,
MenuId
}
from
'
vs/platform/actions/common/actions
'
;
import
{
isMacintosh
}
from
'
vs/base/common/platform
'
;
import
{
isMacintosh
}
from
'
vs/base/common/platform
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
recentMenuRegistration
();
recentMenuRegistration
();
fileMenuRegistration
();
fileMenuRegistration
();
...
@@ -16,7 +15,6 @@ viewMenuRegistration();
...
@@ -16,7 +15,6 @@ viewMenuRegistration();
appearanceMenuRegistration
();
appearanceMenuRegistration
();
layoutMenuRegistration
();
layoutMenuRegistration
();
goMenuRegistration
();
goMenuRegistration
();
debugMenuRegistration
();
tasksMenuRegistration
();
tasksMenuRegistration
();
if
(
isMacintosh
)
{
if
(
isMacintosh
)
{
...
@@ -1052,184 +1050,6 @@ function goMenuRegistration() {
...
@@ -1052,184 +1050,6 @@ function goMenuRegistration() {
});
});
}
}
function
debugMenuRegistration
()
{
// Start/Stop Debug
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
1_debug
'
,
command
:
{
id
:
'
workbench.action.debug.start
'
,
title
:
nls
.
localize
({
key
:
'
miStartDebugging
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Start Debugging
"
),
precondition
:
ContextKeyExpr
.
not
(
'
inDebugMode
'
)
},
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
1_debug
'
,
command
:
{
id
:
'
workbench.action.debug.run
'
,
title
:
nls
.
localize
({
key
:
'
miStartWithoutDebugging
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Start &&Without Debugging
"
),
precondition
:
ContextKeyExpr
.
not
(
'
inDebugMode
'
)
},
order
:
2
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
1_debug
'
,
command
:
{
id
:
'
workbench.action.debug.stop
'
,
title
:
nls
.
localize
({
key
:
'
miStopDebugging
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Stop Debugging
"
),
precondition
:
ContextKeyExpr
.
has
(
'
inDebugMode
'
)
},
order
:
3
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
1_debug
'
,
command
:
{
id
:
'
workbench.action.debug.restart
'
,
title
:
nls
.
localize
({
key
:
'
miRestart Debugging
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Restart Debugging
"
),
precondition
:
ContextKeyExpr
.
has
(
'
inDebugMode
'
)
},
order
:
4
});
// Configuration
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
2_configuration
'
,
command
:
{
id
:
'
workbench.action.debug.configure
'
,
title
:
nls
.
localize
({
key
:
'
miOpenConfigurations
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Open &&Configurations
"
)
},
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
2_configuration
'
,
command
:
{
id
:
'
debug.addConfiguration
'
,
title
:
nls
.
localize
({
key
:
'
miAddConfiguration
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Add Configuration...
"
)
},
order
:
2
});
// Step Commands
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
3_step
'
,
command
:
{
id
:
'
workbench.action.debug.stepOver
'
,
title
:
nls
.
localize
({
key
:
'
miStepOver
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Step &&Over
"
),
precondition
:
ContextKeyExpr
.
has
(
'
inDebugMode
'
)
},
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
3_step
'
,
command
:
{
id
:
'
workbench.action.debug.stepInto
'
,
title
:
nls
.
localize
({
key
:
'
miStepInto
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Step &&Into
"
),
precondition
:
ContextKeyExpr
.
has
(
'
inDebugMode
'
)
},
order
:
2
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
3_step
'
,
command
:
{
id
:
'
workbench.action.debug.stepOut
'
,
title
:
nls
.
localize
({
key
:
'
miStepOut
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Step O&&ut
"
),
precondition
:
ContextKeyExpr
.
has
(
'
inDebugMode
'
)
},
order
:
3
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
3_step
'
,
command
:
{
id
:
'
workbench.action.debug.continue
'
,
title
:
nls
.
localize
({
key
:
'
miContinue
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Continue
"
),
precondition
:
ContextKeyExpr
.
has
(
'
inDebugMode
'
)
},
order
:
4
});
// New Breakpoints
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
4_new_breakpoint
'
,
command
:
{
id
:
'
editor.debug.action.toggleBreakpoint
'
,
title
:
nls
.
localize
({
key
:
'
miToggleBreakpoint
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle &&Breakpoint
"
)
},
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
4_new_breakpoint
'
,
command
:
{
id
:
'
editor.debug.action.conditionalBreakpoint
'
,
title
:
nls
.
localize
({
key
:
'
miConditionalBreakpoint
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle &&Conditional Breakpoint...
"
)
},
order
:
2
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
4_new_breakpoint
'
,
command
:
{
id
:
'
editor.debug.action.toggleInlineBreakpoint
'
,
title
:
nls
.
localize
({
key
:
'
miInlineBreakpoint
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle Inline Breakp&&oint
"
)
},
order
:
3
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
4_new_breakpoint
'
,
command
:
{
id
:
'
workbench.debug.viewlet.action.addFunctionBreakpointAction
'
,
title
:
nls
.
localize
({
key
:
'
miFunctionBreakpoint
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle &&Function Breakpoint...
"
)
},
order
:
4
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
4_new_breakpoint
'
,
command
:
{
id
:
'
editor.debug.action.toggleLogPoint
'
,
title
:
nls
.
localize
({
key
:
'
miLogPoint
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle &&Logpoint...
"
)
},
order
:
5
});
// Modify Breakpoints
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
5_breakpoints
'
,
command
:
{
id
:
'
workbench.debug.viewlet.action.enableAllBreakpoints
'
,
title
:
nls
.
localize
({
key
:
'
miEnableAllBreakpoints
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Enable All Breakpoints
"
)
},
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
5_breakpoints
'
,
command
:
{
id
:
'
workbench.debug.viewlet.action.disableAllBreakpoints
'
,
title
:
nls
.
localize
({
key
:
'
miDisableAllBreakpoints
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Disable A&&ll Breakpoints
"
)
},
order
:
2
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
5_breakpoints
'
,
command
:
{
id
:
'
workbench.debug.viewlet.action.removeAllBreakpoints
'
,
title
:
nls
.
localize
({
key
:
'
miRemoveAllBreakpoints
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Remove &&All Breakpoints
"
)
},
order
:
3
});
}
function
tasksMenuRegistration
()
{
function
tasksMenuRegistration
()
{
// Run Tasks
// Run Tasks
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarTasksMenu
,
{
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarTasksMenu
,
{
...
...
src/vs/workbench/parts/debug/browser/debugCommands.ts
浏览文件 @
0738ae2f
...
@@ -25,6 +25,9 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
...
@@ -25,6 +25,9 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
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
'
;
export
const
ADD_CONFIGURATION_ID
=
'
debug.addConfiguration
'
;
export
const
TOGGLE_INLINE_BREAKPOINT_ID
=
'
editor.debug.action.toggleInlineBreakpoint
'
;
export
function
registerCommands
():
void
{
export
function
registerCommands
():
void
{
KeybindingsRegistry
.
registerCommandAndKeybindingRule
({
KeybindingsRegistry
.
registerCommandAndKeybindingRule
({
...
@@ -171,7 +174,7 @@ export function registerCommands(): void {
...
@@ -171,7 +174,7 @@ export function registerCommands(): void {
});
});
KeybindingsRegistry
.
registerCommandAndKeybindingRule
({
KeybindingsRegistry
.
registerCommandAndKeybindingRule
({
id
:
'
debug.addConfiguration
'
,
id
:
ADD_CONFIGURATION_ID
,
weight
:
KeybindingsRegistry
.
WEIGHT
.
workbenchContrib
(),
weight
:
KeybindingsRegistry
.
WEIGHT
.
workbenchContrib
(),
when
:
undefined
,
when
:
undefined
,
primary
:
undefined
,
primary
:
undefined
,
...
@@ -196,7 +199,6 @@ export function registerCommands(): void {
...
@@ -196,7 +199,6 @@ export function registerCommands(): void {
}
}
});
});
const
INLINE_BREAKPOINT_COMMAND_ID
=
'
editor.debug.action.toggleInlineBreakpoint
'
;
const
inlineBreakpointHandler
=
(
accessor
:
ServicesAccessor
)
=>
{
const
inlineBreakpointHandler
=
(
accessor
:
ServicesAccessor
)
=>
{
const
debugService
=
accessor
.
get
(
IDebugService
);
const
debugService
=
accessor
.
get
(
IDebugService
);
const
editorService
=
accessor
.
get
(
IEditorService
);
const
editorService
=
accessor
.
get
(
IEditorService
);
...
@@ -221,20 +223,20 @@ export function registerCommands(): void {
...
@@ -221,20 +223,20 @@ export function registerCommands(): void {
weight
:
KeybindingsRegistry
.
WEIGHT
.
workbenchContrib
(),
weight
:
KeybindingsRegistry
.
WEIGHT
.
workbenchContrib
(),
primary
:
KeyMod
.
Shift
|
KeyCode
.
F9
,
primary
:
KeyMod
.
Shift
|
KeyCode
.
F9
,
when
:
EditorContextKeys
.
editorTextFocus
,
when
:
EditorContextKeys
.
editorTextFocus
,
id
:
INLINE_BREAKPOINT_COMMAND
_ID
,
id
:
TOGGLE_INLINE_BREAKPOINT
_ID
,
handler
:
inlineBreakpointHandler
handler
:
inlineBreakpointHandler
});
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
CommandPalette
,
{
MenuRegistry
.
appendMenuItem
(
MenuId
.
CommandPalette
,
{
command
:
{
command
:
{
id
:
INLINE_BREAKPOINT_COMMAND
_ID
,
id
:
TOGGLE_INLINE_BREAKPOINT
_ID
,
title
:
nls
.
localize
(
'
inlineBreakpoint
'
,
"
Inline Breakpoint
"
),
title
:
nls
.
localize
(
'
inlineBreakpoint
'
,
"
Inline Breakpoint
"
),
category
:
nls
.
localize
(
'
debug
'
,
"
Debug
"
)
category
:
nls
.
localize
(
'
debug
'
,
"
Debug
"
)
}
}
});
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
EditorContext
,
{
MenuRegistry
.
appendMenuItem
(
MenuId
.
EditorContext
,
{
command
:
{
command
:
{
id
:
INLINE_BREAKPOINT_COMMAND
_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
,
CONTEXT_NOT_IN_DEBUG_REPL
,
EditorContextKeys
.
writable
),
when
:
ContextKeyExpr
.
and
(
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
,
EditorContextKeys
.
writable
),
...
...
src/vs/workbench/parts/debug/browser/debugEditorActions.ts
浏览文件 @
0738ae2f
...
@@ -17,10 +17,11 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
...
@@ -17,10 +17,11 @@ 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
'
;
export
const
TOGGLE_BREAKPOINT_ID
=
'
editor.debug.action.toggleBreakpoint
'
;
class
ToggleBreakpointAction
extends
EditorAction
{
class
ToggleBreakpointAction
extends
EditorAction
{
constructor
()
{
constructor
()
{
super
({
super
({
id
:
'
editor.debug.action.toggleBreakpoint
'
,
id
:
TOGGLE_BREAKPOINT_ID
,
label
:
nls
.
localize
(
'
toggleBreakpointAction
'
,
"
Debug: Toggle Breakpoint
"
),
label
:
nls
.
localize
(
'
toggleBreakpointAction
'
,
"
Debug: Toggle Breakpoint
"
),
alias
:
'
Debug: Toggle Breakpoint
'
,
alias
:
'
Debug: Toggle Breakpoint
'
,
precondition
:
null
,
precondition
:
null
,
...
@@ -49,11 +50,12 @@ class ToggleBreakpointAction extends EditorAction {
...
@@ -49,11 +50,12 @@ class ToggleBreakpointAction extends EditorAction {
}
}
}
}
export
const
TOGGLE_CONDITIONAL_BREAKPOINT_ID
=
'
editor.debug.action.conditionalBreakpoint
'
;
class
ConditionalBreakpointAction
extends
EditorAction
{
class
ConditionalBreakpointAction
extends
EditorAction
{
constructor
()
{
constructor
()
{
super
({
super
({
id
:
'
editor.debug.action.conditionalBreakpoint
'
,
id
:
TOGGLE_CONDITIONAL_BREAKPOINT_ID
,
label
:
nls
.
localize
(
'
conditionalBreakpointEditorAction
'
,
"
Debug: Add Conditional Breakpoint...
"
),
label
:
nls
.
localize
(
'
conditionalBreakpointEditorAction
'
,
"
Debug: Add Conditional Breakpoint...
"
),
alias
:
'
Debug: Add Conditional Breakpoint...
'
,
alias
:
'
Debug: Add Conditional Breakpoint...
'
,
precondition
:
null
precondition
:
null
...
@@ -70,11 +72,12 @@ class ConditionalBreakpointAction extends EditorAction {
...
@@ -70,11 +72,12 @@ class ConditionalBreakpointAction extends EditorAction {
}
}
}
}
export
const
TOGGLE_LOG_POINT_ID
=
'
editor.debug.action.toggleLogPoint
'
;
class
LogPointAction
extends
EditorAction
{
class
LogPointAction
extends
EditorAction
{
constructor
()
{
constructor
()
{
super
({
super
({
id
:
'
editor.debug.action.toggleLogPoint
'
,
id
:
TOGGLE_LOG_POINT_ID
,
label
:
nls
.
localize
(
'
logPointEditorAction
'
,
"
Debug: Add Logpoint...
"
),
label
:
nls
.
localize
(
'
logPointEditorAction
'
,
"
Debug: Add Logpoint...
"
),
alias
:
'
Debug: Add Logpoint...
'
,
alias
:
'
Debug: Add Logpoint...
'
,
precondition
:
null
precondition
:
null
...
...
src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
浏览文件 @
0738ae2f
...
@@ -37,7 +37,7 @@ import * as service from 'vs/workbench/parts/debug/electron-browser/debugService
...
@@ -37,7 +37,7 @@ import * as service from 'vs/workbench/parts/debug/electron-browser/debugService
import
{
DebugContentProvider
}
from
'
vs/workbench/parts/debug/browser/debugContentProvider
'
;
import
{
DebugContentProvider
}
from
'
vs/workbench/parts/debug/browser/debugContentProvider
'
;
import
'
vs/workbench/parts/debug/electron-browser/debugEditorContribution
'
;
import
'
vs/workbench/parts/debug/electron-browser/debugEditorContribution
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
{
registerCommands
}
from
'
vs/workbench/parts/debug/browser/debugCommands
'
;
import
{
registerCommands
,
ADD_CONFIGURATION_ID
,
TOGGLE_INLINE_BREAKPOINT_ID
}
from
'
vs/workbench/parts/debug/browser/debugCommands
'
;
import
{
IQuickOpenRegistry
,
Extensions
as
QuickOpenExtensions
,
QuickOpenHandlerDescriptor
}
from
'
vs/workbench/browser/quickopen
'
;
import
{
IQuickOpenRegistry
,
Extensions
as
QuickOpenExtensions
,
QuickOpenHandlerDescriptor
}
from
'
vs/workbench/browser/quickopen
'
;
import
{
StatusBarColorProvider
}
from
'
vs/workbench/parts/debug/browser/statusbarColorProvider
'
;
import
{
StatusBarColorProvider
}
from
'
vs/workbench/parts/debug/browser/statusbarColorProvider
'
;
import
{
ViewsRegistry
}
from
'
vs/workbench/common/views
'
;
import
{
ViewsRegistry
}
from
'
vs/workbench/common/views
'
;
...
@@ -52,6 +52,7 @@ import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
...
@@ -52,6 +52,7 @@ import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import
{
launchSchemaId
}
from
'
vs/workbench/services/configuration/common/configuration
'
;
import
{
launchSchemaId
}
from
'
vs/workbench/services/configuration/common/configuration
'
;
import
{
IEditorGroupsService
}
from
'
vs/workbench/services/group/common/editorGroupsService
'
;
import
{
IEditorGroupsService
}
from
'
vs/workbench/services/group/common/editorGroupsService
'
;
import
{
LoadedScriptsView
}
from
'
vs/workbench/parts/debug/browser/loadedScriptsView
'
;
import
{
LoadedScriptsView
}
from
'
vs/workbench/parts/debug/browser/loadedScriptsView
'
;
import
{
TOGGLE_LOG_POINT_ID
,
TOGGLE_CONDITIONAL_BREAKPOINT_ID
,
TOGGLE_BREAKPOINT_ID
}
from
'
vs/workbench/parts/debug/browser/debugEditorActions
'
;
class
OpenDebugViewletAction
extends
ToggleViewletAction
{
class
OpenDebugViewletAction
extends
ToggleViewletAction
{
public
static
readonly
ID
=
VIEWLET_ID
;
public
static
readonly
ID
=
VIEWLET_ID
;
...
@@ -227,6 +228,180 @@ registerCommands();
...
@@ -227,6 +228,180 @@ registerCommands();
const
statusBar
=
Registry
.
as
<
IStatusbarRegistry
>
(
StatusExtensions
.
Statusbar
);
const
statusBar
=
Registry
.
as
<
IStatusbarRegistry
>
(
StatusExtensions
.
Statusbar
);
statusBar
.
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
DebugStatus
,
StatusbarAlignment
.
LEFT
,
30
/* Low Priority */
));
statusBar
.
registerStatusbarItem
(
new
StatusbarItemDescriptor
(
DebugStatus
,
StatusbarAlignment
.
LEFT
,
30
/* Low Priority */
));
// Register debug menu
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
1_debug
'
,
command
:
{
id
:
StartAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miStartDebugging
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Start Debugging
"
)
},
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
1_debug
'
,
command
:
{
id
:
RunAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miStartWithoutDebugging
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Start &&Without Debugging
"
)
},
order
:
2
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
1_debug
'
,
command
:
{
id
:
StopAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miStopDebugging
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Stop Debugging
"
),
precondition
:
CONTEXT_IN_DEBUG_MODE
},
order
:
3
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
1_debug
'
,
command
:
{
id
:
RestartAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miRestart Debugging
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Restart Debugging
"
),
precondition
:
CONTEXT_IN_DEBUG_MODE
},
order
:
4
});
// Configuration
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
2_configuration
'
,
command
:
{
id
:
ConfigureAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miOpenConfigurations
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Open &&Configurations
"
)
},
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
2_configuration
'
,
command
:
{
id
:
ADD_CONFIGURATION_ID
,
title
:
nls
.
localize
({
key
:
'
miAddConfiguration
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Add Configuration...
"
)
},
order
:
2
});
// Step Commands
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
3_step
'
,
command
:
{
id
:
StepOverAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miStepOver
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Step &&Over
"
),
precondition
:
CONTEXT_DEBUG_STATE
.
isEqualTo
(
'
stopped
'
)
},
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
3_step
'
,
command
:
{
id
:
StepIntoAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miStepInto
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Step &&Into
"
),
precondition
:
CONTEXT_DEBUG_STATE
.
isEqualTo
(
'
stopped
'
)
},
order
:
2
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
3_step
'
,
command
:
{
id
:
StepOutAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miStepOut
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Step O&&ut
"
),
precondition
:
CONTEXT_DEBUG_STATE
.
isEqualTo
(
'
stopped
'
)
},
order
:
3
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
3_step
'
,
command
:
{
id
:
ContinueAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miContinue
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Continue
"
),
precondition
:
CONTEXT_DEBUG_STATE
.
isEqualTo
(
'
stopped
'
)
},
order
:
4
});
// New Breakpoints
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
4_new_breakpoint
'
,
command
:
{
id
:
TOGGLE_BREAKPOINT_ID
,
title
:
nls
.
localize
({
key
:
'
miToggleBreakpoint
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle &&Breakpoint
"
)
},
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
4_new_breakpoint
'
,
command
:
{
id
:
TOGGLE_CONDITIONAL_BREAKPOINT_ID
,
title
:
nls
.
localize
({
key
:
'
miConditionalBreakpoint
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle &&Conditional Breakpoint...
"
)
},
order
:
2
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
4_new_breakpoint
'
,
command
:
{
id
:
TOGGLE_INLINE_BREAKPOINT_ID
,
title
:
nls
.
localize
({
key
:
'
miInlineBreakpoint
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle Inline Breakp&&oint
"
)
},
order
:
3
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
4_new_breakpoint
'
,
command
:
{
id
:
AddFunctionBreakpointAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miFunctionBreakpoint
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle &&Function Breakpoint...
"
)
},
order
:
4
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
4_new_breakpoint
'
,
command
:
{
id
:
TOGGLE_LOG_POINT_ID
,
title
:
nls
.
localize
({
key
:
'
miLogPoint
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle &&Logpoint...
"
)
},
order
:
5
});
// Modify Breakpoints
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
5_breakpoints
'
,
command
:
{
id
:
EnableAllBreakpointsAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miEnableAllBreakpoints
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Enable All Breakpoints
"
)
},
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
5_breakpoints
'
,
command
:
{
id
:
DisableAllBreakpointsAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miDisableAllBreakpoints
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Disable A&&ll Breakpoints
"
)
},
order
:
2
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarDebugMenu
,
{
group
:
'
5_breakpoints
'
,
command
:
{
id
:
RemoveAllBreakpointsAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miRemoveAllBreakpoints
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Remove &&All Breakpoints
"
)
},
order
:
3
});
// Touch Bar
// Touch Bar
if
(
isMacintosh
)
{
if
(
isMacintosh
)
{
...
...
src/vs/workbench/workbench.main.ts
浏览文件 @
0738ae2f
...
@@ -64,7 +64,6 @@ import 'vs/workbench/parts/scm/electron-browser/scmViewlet'; // can be packaged
...
@@ -64,7 +64,6 @@ import 'vs/workbench/parts/scm/electron-browser/scmViewlet'; // can be packaged
import
'
vs/workbench/parts/debug/electron-browser/debug.contribution
'
;
import
'
vs/workbench/parts/debug/electron-browser/debug.contribution
'
;
import
'
vs/workbench/parts/debug/browser/debugQuickOpen
'
;
import
'
vs/workbench/parts/debug/browser/debugQuickOpen
'
;
import
'
vs/workbench/parts/debug/electron-browser/repl
'
;
import
'
vs/workbench/parts/debug/electron-browser/repl
'
;
import
'
vs/workbench/parts/debug/browser/debugEditorActions
'
;
import
'
vs/workbench/parts/debug/browser/debugViewlet
'
;
// can be packaged separately
import
'
vs/workbench/parts/debug/browser/debugViewlet
'
;
// can be packaged separately
import
'
vs/workbench/parts/markers/electron-browser/markers.contribution
'
;
import
'
vs/workbench/parts/markers/electron-browser/markers.contribution
'
;
...
@@ -142,4 +141,4 @@ import 'vs/workbench/parts/navigation/common/navigation.contribution';
...
@@ -142,4 +141,4 @@ import 'vs/workbench/parts/navigation/common/navigation.contribution';
// services
// services
import
'
vs/workbench/services/bulkEdit/electron-browser/bulkEditService
'
;
import
'
vs/workbench/services/bulkEdit/electron-browser/bulkEditService
'
;
import
'
vs/workbench/parts/experiments/electron-browser/experiments.contribution
'
;
import
'
vs/workbench/parts/experiments/electron-browser/experiments.contribution
'
;
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录