Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
194adb49
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,发现更多精彩内容 >>
提交
194adb49
编写于
4月 18, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: fix action labels for log points
fixes #46821
上级
07acfd7e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
8 deletion
+11
-8
src/vs/workbench/parts/debug/browser/breakpointsView.ts
src/vs/workbench/parts/debug/browser/breakpointsView.ts
+3
-2
src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts
...h/parts/debug/electron-browser/debugEditorContribution.ts
+8
-6
未找到文件。
src/vs/workbench/parts/debug/browser/breakpointsView.ts
浏览文件 @
194adb49
...
...
@@ -124,8 +124,9 @@ export class BreakpointsView extends ViewsViewletPanel {
const
actions
:
IAction
[]
=
[];
const
element
=
e
.
element
;
const
breakpointType
=
element
instanceof
Breakpoint
&&
element
.
logMessage
?
nls
.
localize
(
'
logPoint
'
,
"
Log Point
"
)
:
nls
.
localize
(
'
breakpoint
'
,
"
Breakpoint
"
);
if
(
element
instanceof
Breakpoint
||
element
instanceof
FunctionBreakpoint
)
{
actions
.
push
(
new
Action
(
'
workbench.action.debug.openEditorAndEditBreakpoint
'
,
nls
.
localize
(
'
edit
ConditionalBreakpoint
'
,
"
Edit Breakpoint...
"
),
undefined
,
true
,
()
=>
{
actions
.
push
(
new
Action
(
'
workbench.action.debug.openEditorAndEditBreakpoint
'
,
nls
.
localize
(
'
edit
Breakpoint
'
,
"
Edit {0}...
"
,
breakpointType
),
undefined
,
true
,
()
=>
{
if
(
element
instanceof
Breakpoint
)
{
return
openBreakpointSource
(
element
,
false
,
false
,
this
.
debugService
,
this
.
editorService
).
then
(
editor
=>
{
const
codeEditor
=
editor
.
getControl
();
...
...
@@ -142,7 +143,7 @@ export class BreakpointsView extends ViewsViewletPanel {
actions
.
push
(
new
Separator
());
}
actions
.
push
(
new
RemoveBreakpointAction
(
RemoveBreakpointAction
.
ID
,
RemoveBreakpointAction
.
LABEL
,
this
.
debugService
,
this
.
keybindingService
));
actions
.
push
(
new
RemoveBreakpointAction
(
RemoveBreakpointAction
.
ID
,
nls
.
localize
(
'
removeBreakpoint
'
,
"
Remove {0}
"
,
breakpointType
)
,
this
.
debugService
,
this
.
keybindingService
));
if
(
this
.
debugService
.
getModel
().
getBreakpoints
().
length
+
this
.
debugService
.
getModel
().
getFunctionBreakpoints
().
length
>
1
)
{
actions
.
push
(
new
RemoveAllBreakpointsAction
(
RemoveAllBreakpointsAction
.
ID
,
RemoveAllBreakpointsAction
.
LABEL
,
this
.
debugService
,
this
.
keybindingService
));
...
...
src/vs/workbench/parts/debug/electron-browser/debugEditorContribution.ts
浏览文件 @
194adb49
...
...
@@ -95,10 +95,11 @@ export class DebugEditorContribution implements IDebugEditorContribution {
private
getContextMenuActions
(
breakpoints
:
IBreakpoint
[],
uri
:
uri
,
lineNumber
:
number
):
TPromise
<
(
IAction
|
ContextSubMenu
)[]
>
{
const
actions
:
(
IAction
|
ContextSubMenu
)[]
=
[];
if
(
breakpoints
.
length
===
1
)
{
actions
.
push
(
new
RemoveBreakpointAction
(
RemoveBreakpointAction
.
ID
,
RemoveBreakpointAction
.
LABEL
,
this
.
debugService
,
this
.
keybindingService
));
const
breakpointType
=
breakpoints
[
0
].
logMessage
?
nls
.
localize
(
'
logPoint
'
,
"
Log Point
"
)
:
nls
.
localize
(
'
breakpoint
'
,
"
Breakpoint
"
);
actions
.
push
(
new
RemoveBreakpointAction
(
RemoveBreakpointAction
.
ID
,
nls
.
localize
(
'
removeBreakpoint
'
,
"
Remove {0}
"
,
breakpointType
),
this
.
debugService
,
this
.
keybindingService
));
actions
.
push
(
new
Action
(
'
workbench.debug.action.editBreakpointAction
'
,
nls
.
localize
(
'
editBreakpoint
'
,
"
Edit
Breakpoint...
"
),
nls
.
localize
(
'
editBreakpoint
'
,
"
Edit
{0}...
"
,
breakpointType
),
undefined
,
true
,
()
=>
TPromise
.
as
(
this
.
editor
.
getContribution
<
IDebugEditorContribution
>
(
EDITOR_CONTRIBUTION_ID
).
showBreakpointWidget
(
breakpoints
[
0
].
lineNumber
,
breakpoints
[
0
].
column
))
...
...
@@ -106,7 +107,7 @@ export class DebugEditorContribution implements IDebugEditorContribution {
actions
.
push
(
new
Action
(
`workbench.debug.viewlet.action.toggleBreakpoint`
,
breakpoints
[
0
].
enabled
?
nls
.
localize
(
'
disableBreakpoint
'
,
"
Disable
Breakpoint
"
)
:
nls
.
localize
(
'
enableBreakpoint
'
,
"
Enable Breakpoint
"
),
breakpoints
[
0
].
enabled
?
nls
.
localize
(
'
disableBreakpoint
'
,
"
Disable
{0}
"
,
breakpointType
)
:
nls
.
localize
(
'
enableBreakpoint
'
,
"
Enable {0}
"
,
breakpointType
),
undefined
,
true
,
()
=>
this
.
debugService
.
enableOrDisableBreakpoints
(
!
breakpoints
[
0
].
enabled
,
breakpoints
[
0
])
...
...
@@ -195,10 +196,11 @@ export class DebugEditorContribution implements IDebugEditorContribution {
if
(
breakpoints
.
length
)
{
if
(
breakpoints
.
some
(
bp
=>
!!
bp
.
condition
||
!!
bp
.
logMessage
||
!!
bp
.
hitCondition
))
{
const
logPoint
=
breakpoints
.
every
(
bp
=>
!!
bp
.
logMessage
);
const
breakpointType
=
logPoint
?
nls
.
localize
(
'
logPoint
'
,
"
Log Point
"
)
:
nls
.
localize
(
'
breakpoint
'
,
"
Breakpoint
"
);
this
.
dialogService
.
show
(
severity
.
Info
,
nls
.
localize
(
'
breakpointHasCondition
'
,
"
This {0} has a valuable {1} that will get lost on remove. Consider disabling the {0} instead.
"
,
logPoint
?
nls
.
localize
(
'
logPoint
'
,
"
log point
"
)
:
nls
.
localize
(
'
breakpoint
'
,
"
breakpoint
"
),
logPoint
?
nls
.
localize
(
'
message
'
,
"
message
"
)
:
nls
.
localize
(
'
condition
'
,
"
condition
"
)),
[
logPoint
?
nls
.
localize
(
'
removeLogPoint
'
,
"
Remove Log Point
"
)
:
nls
.
localize
(
'
removeBreakpoint
'
,
"
Remove Breakpoint
"
),
logPoint
?
nls
.
localize
(
'
disableLogPoint
'
,
"
Disable Log Point
"
)
:
nls
.
localize
(
'
disableBreakpoint
'
,
"
Disable Breakpoint
"
),
breakpointType
.
toLowerCase
(
),
logPoint
?
nls
.
localize
(
'
message
'
,
"
message
"
)
:
nls
.
localize
(
'
condition
'
,
"
condition
"
)),
[
nls
.
localize
(
'
removeLogPoint
'
,
"
Remove {0}
"
,
breakpointType
),
nls
.
localize
(
'
disableLogPoint
'
,
"
Disable {0}
"
,
breakpointType
),
nls
.
localize
(
'
cancel
'
,
"
Cancel
"
)
],
{
cancelId
:
2
}).
then
(
choice
=>
{
if
(
choice
===
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录