Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9ba6d409
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,发现更多精彩内容 >>
提交
9ba6d409
编写于
3月 01, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
function breakpoint
fixes #44556
上级
0179894e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
11 deletion
+23
-11
src/vs/workbench/parts/debug/browser/breakpointsView.ts
src/vs/workbench/parts/debug/browser/breakpointsView.ts
+16
-8
src/vs/workbench/parts/debug/browser/debugCommands.ts
src/vs/workbench/parts/debug/browser/debugCommands.ts
+2
-2
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+1
-0
src/vs/workbench/parts/debug/common/debugViewModel.ts
src/vs/workbench/parts/debug/common/debugViewModel.ts
+4
-1
未找到文件。
src/vs/workbench/parts/debug/browser/breakpointsView.ts
浏览文件 @
9ba6d409
...
...
@@ -117,14 +117,20 @@ export class BreakpointsView extends ViewsViewletPanel {
const
actions
:
IAction
[]
=
[];
const
element
=
e
.
element
;
if
(
element
instanceof
Breakpoint
)
{
if
(
element
instanceof
Breakpoint
||
element
instanceof
FunctionBreakpoint
)
{
actions
.
push
(
new
Action
(
'
workbench.action.debug.openEditorAndEditBreakpoint
'
,
nls
.
localize
(
'
editConditionalBreakpoint
'
,
"
Edit Breakpoint...
"
),
undefined
,
true
,
()
=>
{
return
openBreakpointSource
(
element
,
false
,
false
,
this
.
debugService
,
this
.
editorService
).
then
(
editor
=>
{
const
codeEditor
=
editor
.
getControl
();
if
(
isCodeEditor
(
codeEditor
))
{
codeEditor
.
getContribution
<
IDebugEditorContribution
>
(
EDITOR_CONTRIBUTION_ID
).
showBreakpointWidget
(
element
.
lineNumber
,
element
.
column
);
}
});
if
(
element
instanceof
Breakpoint
)
{
return
openBreakpointSource
(
element
,
false
,
false
,
this
.
debugService
,
this
.
editorService
).
then
(
editor
=>
{
const
codeEditor
=
editor
.
getControl
();
if
(
isCodeEditor
(
codeEditor
))
{
codeEditor
.
getContribution
<
IDebugEditorContribution
>
(
EDITOR_CONTRIBUTION_ID
).
showBreakpointWidget
(
element
.
lineNumber
,
element
.
column
);
}
});
}
this
.
debugService
.
getViewModel
().
setSelectedFunctionBreakpoint
(
element
);
this
.
onBreakpointsChange
();
return
undefined
;
}));
actions
.
push
(
new
Separator
());
}
...
...
@@ -483,7 +489,9 @@ class FunctionBreakpointInputRenderer implements IRenderer<IFunctionBreakpoint,
}
}));
toDispose
.
push
(
dom
.
addDisposableListener
(
inputBox
.
inputElement
,
'
blur
'
,
()
=>
{
wrapUp
(
true
);
if
(
!
template
.
breakpoint
.
name
)
{
wrapUp
(
true
);
}
}));
template
.
inputBox
=
inputBox
;
...
...
src/vs/workbench/parts/debug/browser/debugCommands.ts
浏览文件 @
9ba6d409
...
...
@@ -11,7 +11,7 @@ import * as errors from 'vs/base/common/errors';
import
{
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
IListService
}
from
'
vs/platform/list/browser/listService
'
;
import
{
IWorkspaceContextService
,
WorkbenchState
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IDebugService
,
IEnablement
,
CONTEXT_BREAKPOINTS_FOCUSED
,
CONTEXT_WATCH_EXPRESSIONS_FOCUSED
,
CONTEXT_VARIABLES_FOCUSED
,
EDITOR_CONTRIBUTION_ID
,
IDebugEditorContribution
,
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
,
CONTEXT_EXPRESSION_SELECTED
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
IDebugService
,
IEnablement
,
CONTEXT_BREAKPOINTS_FOCUSED
,
CONTEXT_WATCH_EXPRESSIONS_FOCUSED
,
CONTEXT_VARIABLES_FOCUSED
,
EDITOR_CONTRIBUTION_ID
,
IDebugEditorContribution
,
CONTEXT_IN_DEBUG_MODE
,
CONTEXT_NOT_IN_DEBUG_REPL
,
CONTEXT_EXPRESSION_SELECTED
,
CONTEXT_BREAKPOINT_SELECTED
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
Expression
,
Variable
,
Breakpoint
,
FunctionBreakpoint
}
from
'
vs/workbench/parts/debug/common/debugModel
'
;
import
{
IExtensionsViewlet
,
VIEWLET_ID
as
EXTENSIONS_VIEWLET_ID
}
from
'
vs/workbench/parts/extensions/common/extensions
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
...
...
@@ -111,7 +111,7 @@ export function registerCommands(): void {
KeybindingsRegistry
.
registerCommandAndKeybindingRule
({
id
:
'
debug.removeBreakpoint
'
,
weight
:
KeybindingsRegistry
.
WEIGHT
.
workbenchContrib
(),
when
:
C
ONTEXT_BREAKPOINTS_FOCUSED
,
when
:
C
ontextKeyExpr
.
and
(
CONTEXT_WATCH_EXPRESSIONS_FOCUSED
,
CONTEXT_BREAKPOINT_SELECTED
.
toNegated
())
,
primary
:
KeyCode
.
Delete
,
mac
:
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
Backspace
},
handler
:
(
accessor
)
=>
{
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
9ba6d409
...
...
@@ -41,6 +41,7 @@ export const CONTEXT_BREAKPOINTS_FOCUSED = new RawContextKey<boolean>('breakpoin
export
const
CONTEXT_WATCH_EXPRESSIONS_FOCUSED
=
new
RawContextKey
<
boolean
>
(
'
watchExpressionsFocused
'
,
true
);
export
const
CONTEXT_VARIABLES_FOCUSED
=
new
RawContextKey
<
boolean
>
(
'
variablesFocused
'
,
true
);
export
const
CONTEXT_EXPRESSION_SELECTED
=
new
RawContextKey
<
boolean
>
(
'
expressionSelected
'
,
false
);
export
const
CONTEXT_BREAKPOINT_SELECTED
=
new
RawContextKey
<
boolean
>
(
'
breakpointSelected
'
,
false
);
export
const
EDITOR_CONTRIBUTION_ID
=
'
editor.contrib.debug
'
;
export
const
DEBUG_SCHEME
=
'
debug
'
;
...
...
src/vs/workbench/parts/debug/common/debugViewModel.ts
浏览文件 @
9ba6d409
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
Event
,
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
CONTEXT_EXPRESSION_SELECTED
,
IViewModel
,
IStackFrame
,
IProcess
,
IThread
,
IExpression
,
IFunctionBreakpoint
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
CONTEXT_EXPRESSION_SELECTED
,
IViewModel
,
IStackFrame
,
IProcess
,
IThread
,
IExpression
,
IFunctionBreakpoint
,
CONTEXT_BREAKPOINT_SELECTED
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
IContextKeyService
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
export
class
ViewModel
implements
IViewModel
{
...
...
@@ -19,6 +19,7 @@ export class ViewModel implements IViewModel {
private
_onDidSelectExpression
:
Emitter
<
IExpression
>
;
private
multiProcessView
:
boolean
;
private
expressionSelectedContextKey
:
IContextKey
<
boolean
>
;
private
breakpointSelectedContextKey
:
IContextKey
<
boolean
>
;
constructor
(
contextKeyService
:
IContextKeyService
)
{
this
.
_onDidFocusProcess
=
new
Emitter
<
IProcess
|
undefined
>
();
...
...
@@ -26,6 +27,7 @@ export class ViewModel implements IViewModel {
this
.
_onDidSelectExpression
=
new
Emitter
<
IExpression
>
();
this
.
multiProcessView
=
false
;
this
.
expressionSelectedContextKey
=
CONTEXT_EXPRESSION_SELECTED
.
bindTo
(
contextKeyService
);
this
.
breakpointSelectedContextKey
=
CONTEXT_BREAKPOINT_SELECTED
.
bindTo
(
contextKeyService
);
}
public
getId
():
string
{
...
...
@@ -87,6 +89,7 @@ export class ViewModel implements IViewModel {
public
setSelectedFunctionBreakpoint
(
functionBreakpoint
:
IFunctionBreakpoint
):
void
{
this
.
selectedFunctionBreakpoint
=
functionBreakpoint
;
this
.
breakpointSelectedContextKey
.
set
(
!!
functionBreakpoint
);
}
public
isMultiProcessView
():
boolean
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录