Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
3f0381cd
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,发现更多精彩内容 >>
提交
3f0381cd
编写于
2月 09, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: surface function breakpoints
上级
45e34429
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
35 addition
and
20 deletion
+35
-20
src/vs/workbench/parts/debug/browser/debugHover.ts
src/vs/workbench/parts/debug/browser/debugHover.ts
+0
-1
src/vs/workbench/parts/debug/browser/debugViewer.ts
src/vs/workbench/parts/debug/browser/debugViewer.ts
+2
-2
src/vs/workbench/parts/debug/browser/debugViewlet.ts
src/vs/workbench/parts/debug/browser/debugViewlet.ts
+1
-1
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+1
-0
src/vs/workbench/parts/debug/common/debugModel.ts
src/vs/workbench/parts/debug/common/debugModel.ts
+2
-2
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+25
-14
src/vs/workbench/parts/debug/node/rawDebugSession.ts
src/vs/workbench/parts/debug/node/rawDebugSession.ts
+4
-0
未找到文件。
src/vs/workbench/parts/debug/browser/debugHover.ts
浏览文件 @
3f0381cd
...
@@ -86,7 +86,6 @@ export class DebugHoverWidget implements editorbrowser.IContentWidget {
...
@@ -86,7 +86,6 @@ export class DebugHoverWidget implements editorbrowser.IContentWidget {
namesToFind
.
push
(
hoveringOver
);
namesToFind
.
push
(
hoveringOver
);
namesToFind
[
0
]
=
namesToFind
[
0
].
substring
(
namesToFind
[
0
].
lastIndexOf
(
'
'
)
+
1
);
namesToFind
[
0
]
=
namesToFind
[
0
].
substring
(
namesToFind
[
0
].
lastIndexOf
(
'
'
)
+
1
);
this
.
getExpression
(
namesToFind
).
done
(
expression
=>
{
this
.
getExpression
(
namesToFind
).
done
(
expression
=>
{
if
(
!
expression
||
!
expression
.
available
)
{
if
(
!
expression
||
!
expression
.
available
)
{
this
.
hide
();
this
.
hide
();
...
...
src/vs/workbench/parts/debug/browser/debugViewer.ts
浏览文件 @
3f0381cd
...
@@ -742,8 +742,8 @@ export class BreakpointsActionProvider implements renderer.IActionProvider {
...
@@ -742,8 +742,8 @@ export class BreakpointsActionProvider implements renderer.IActionProvider {
actions
.
push
(
this
.
instantiationService
.
createInstance
(
debugactions
.
DisableAllBreakpointsAction
,
debugactions
.
DisableAllBreakpointsAction
.
ID
,
debugactions
.
DisableAllBreakpointsAction
.
LABEL
));
actions
.
push
(
this
.
instantiationService
.
createInstance
(
debugactions
.
DisableAllBreakpointsAction
,
debugactions
.
DisableAllBreakpointsAction
.
ID
,
debugactions
.
DisableAllBreakpointsAction
.
LABEL
));
actions
.
push
(
new
actionbar
.
Separator
());
actions
.
push
(
new
actionbar
.
Separator
());
//
actions.push(this.instantiationService.createInstance(debugactions.AddFunctionBreakpointAction, debugactions.AddFunctionBreakpointAction.ID, debugactions.AddFunctionBreakpointAction.LABEL));
actions
.
push
(
this
.
instantiationService
.
createInstance
(
debugactions
.
AddFunctionBreakpointAction
,
debugactions
.
AddFunctionBreakpointAction
.
ID
,
debugactions
.
AddFunctionBreakpointAction
.
LABEL
));
//
actions.push(new actionbar.Separator());
actions
.
push
(
new
actionbar
.
Separator
());
actions
.
push
(
this
.
instantiationService
.
createInstance
(
debugactions
.
ReapplyBreakpointsAction
,
debugactions
.
ReapplyBreakpointsAction
.
ID
,
debugactions
.
ReapplyBreakpointsAction
.
LABEL
));
actions
.
push
(
this
.
instantiationService
.
createInstance
(
debugactions
.
ReapplyBreakpointsAction
,
debugactions
.
ReapplyBreakpointsAction
.
ID
,
debugactions
.
ReapplyBreakpointsAction
.
LABEL
));
...
...
src/vs/workbench/parts/debug/browser/debugViewlet.ts
浏览文件 @
3f0381cd
...
@@ -395,7 +395,7 @@ class BreakpointsView extends viewlet.AdaptiveCollapsibleViewletView {
...
@@ -395,7 +395,7 @@ class BreakpointsView extends viewlet.AdaptiveCollapsibleViewletView {
public
getActions
():
actions
.
IAction
[]
{
public
getActions
():
actions
.
IAction
[]
{
return
[
return
[
//
this.instantiationService.createInstance(debugactions.AddFunctionBreakpointAction, debugactions.AddFunctionBreakpointAction.ID, debugactions.AddFunctionBreakpointAction.LABEL),
this
.
instantiationService
.
createInstance
(
debugactions
.
AddFunctionBreakpointAction
,
debugactions
.
AddFunctionBreakpointAction
.
ID
,
debugactions
.
AddFunctionBreakpointAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
debugactions
.
ReapplyBreakpointsAction
,
debugactions
.
ReapplyBreakpointsAction
.
ID
,
debugactions
.
ReapplyBreakpointsAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
debugactions
.
ReapplyBreakpointsAction
,
debugactions
.
ReapplyBreakpointsAction
.
ID
,
debugactions
.
ReapplyBreakpointsAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
debugactions
.
ToggleBreakpointsActivatedAction
,
debugactions
.
ToggleBreakpointsActivatedAction
.
ID
,
debugactions
.
ToggleBreakpointsActivatedAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
debugactions
.
ToggleBreakpointsActivatedAction
,
debugactions
.
ToggleBreakpointsActivatedAction
.
ID
,
debugactions
.
ToggleBreakpointsActivatedAction
.
LABEL
),
this
.
instantiationService
.
createInstance
(
debugactions
.
RemoveAllBreakpointsAction
,
debugactions
.
RemoveAllBreakpointsAction
.
ID
,
debugactions
.
RemoveAllBreakpointsAction
.
LABEL
)
this
.
instantiationService
.
createInstance
(
debugactions
.
RemoveAllBreakpointsAction
,
debugactions
.
RemoveAllBreakpointsAction
.
ID
,
debugactions
.
RemoveAllBreakpointsAction
.
LABEL
)
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
3f0381cd
...
@@ -86,6 +86,7 @@ export interface IBreakpoint extends IEnablement {
...
@@ -86,6 +86,7 @@ export interface IBreakpoint extends IEnablement {
export
interface
IFunctionBreakpoint
extends
IEnablement
{
export
interface
IFunctionBreakpoint
extends
IEnablement
{
name
:
string
;
name
:
string
;
verified
:
boolean
;
}
}
export
interface
IExceptionBreakpoint
extends
IEnablement
{
export
interface
IExceptionBreakpoint
extends
IEnablement
{
...
...
src/vs/workbench/parts/debug/common/debugModel.ts
浏览文件 @
3f0381cd
...
@@ -301,10 +301,10 @@ export class Breakpoint implements debug.IBreakpoint {
...
@@ -301,10 +301,10 @@ export class Breakpoint implements debug.IBreakpoint {
export
class
FunctionBreakpoint
implements
debug
.
IFunctionBreakpoint
{
export
class
FunctionBreakpoint
implements
debug
.
IFunctionBreakpoint
{
private
id
:
string
;
private
id
:
string
;
public
error
:
boolean
;
public
verified
:
boolean
;
constructor
(
public
name
:
string
,
public
enabled
:
boolean
)
{
constructor
(
public
name
:
string
,
public
enabled
:
boolean
)
{
this
.
error
=
false
;
this
.
verified
=
false
;
this
.
id
=
uuid
.
generateUuid
();
this
.
id
=
uuid
.
generateUuid
();
}
}
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
3f0381cd
...
@@ -226,7 +226,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
...
@@ -226,7 +226,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
private
registerSessionListeners
():
void
{
private
registerSessionListeners
():
void
{
this
.
toDispose
.
push
(
this
.
session
.
addListener2
(
debug
.
SessionEvents
.
INITIALIZED
,
(
event
:
DebugProtocol
.
InitializedEvent
)
=>
this
.
toDispose
.
push
(
this
.
session
.
addListener2
(
debug
.
SessionEvents
.
INITIALIZED
,
(
event
:
DebugProtocol
.
InitializedEvent
)
=>
this
.
sendAllBreakpoints
().
then
(()
=>
this
.
sendExceptionBreakpoints
()).
then
(()
=>
{
this
.
sendAllBreakpoints
().
then
(()
=>
{
if
(
this
.
session
.
capablities
.
supportsConfigurationDoneRequest
)
{
if
(
this
.
session
.
capablities
.
supportsConfigurationDoneRequest
)
{
this
.
session
.
configurationDone
().
done
(
null
,
errors
.
onUnexpectedError
);
this
.
session
.
configurationDone
().
done
(
null
,
errors
.
onUnexpectedError
);
}
}
...
@@ -413,8 +413,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
...
@@ -413,8 +413,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
const
breakpoint
=
<
model
.
Breakpoint
>
element
;
const
breakpoint
=
<
model
.
Breakpoint
>
element
;
return
this
.
sendBreakpoints
(
breakpoint
.
source
.
uri
);
return
this
.
sendBreakpoints
(
breakpoint
.
source
.
uri
);
}
else
if
(
element
instanceof
model
.
FunctionBreakpoint
)
{
}
else
if
(
element
instanceof
model
.
FunctionBreakpoint
)
{
return
TPromise
.
as
(
null
);
return
this
.
sendFunctionBreakpoints
();
// TODO@Isidor send function breakpoints and return
}
}
return
this
.
sendExceptionBreakpoints
();
return
this
.
sendExceptionBreakpoints
();
...
@@ -445,20 +444,17 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
...
@@ -445,20 +444,17 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
public
addFunctionBreakpoint
(
functionName
?:
string
):
TPromise
<
void
>
{
public
addFunctionBreakpoint
(
functionName
?:
string
):
TPromise
<
void
>
{
this
.
model
.
addFunctionBreakpoint
(
functionName
);
this
.
model
.
addFunctionBreakpoint
(
functionName
);
// TODO@Isidor send updated function breakpoints
return
this
.
sendFunctionBreakpoints
();
return
TPromise
.
as
(
null
);
}
}
public
renameFunctionBreakpoint
(
id
:
string
,
newFunctionName
:
string
):
TPromise
<
void
>
{
public
renameFunctionBreakpoint
(
id
:
string
,
newFunctionName
:
string
):
TPromise
<
void
>
{
this
.
model
.
renameFunctionBreakpoint
(
id
,
newFunctionName
);
this
.
model
.
renameFunctionBreakpoint
(
id
,
newFunctionName
);
// TODO@Isidor send updated function breakpoints
return
this
.
sendFunctionBreakpoints
();
return
TPromise
.
as
(
null
);
}
}
public
removeFunctionBreakpoints
(
id
?:
string
):
TPromise
<
void
>
{
public
removeFunctionBreakpoints
(
id
?:
string
):
TPromise
<
void
>
{
this
.
model
.
removeFunctionBreakpoints
(
id
);
this
.
model
.
removeFunctionBreakpoints
(
id
);
// TODO@Isidor send updated function breakpoints
return
this
.
sendFunctionBreakpoints
();
return
TPromise
.
as
(
null
);
}
}
public
addReplExpression
(
name
:
string
):
TPromise
<
void
>
{
public
addReplExpression
(
name
:
string
):
TPromise
<
void
>
{
...
@@ -784,12 +780,15 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
...
@@ -784,12 +780,15 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
}
}
public
sendAllBreakpoints
():
TPromise
<
any
>
{
public
sendAllBreakpoints
():
TPromise
<
any
>
{
return
TPromise
.
join
(
arrays
.
distinct
(
this
.
model
.
getBreakpoints
(),
bp
=>
bp
.
source
.
uri
.
toString
()).
map
(
bp
=>
this
.
sendBreakpoints
(
bp
.
source
.
uri
)));
return
TPromise
.
join
(
arrays
.
distinct
(
this
.
model
.
getBreakpoints
(),
bp
=>
bp
.
source
.
uri
.
toString
()).
map
(
bp
=>
this
.
sendBreakpoints
(
bp
.
source
.
uri
)))
.
then
(()
=>
this
.
sendFunctionBreakpoints
())
// send exception breakpoints at the end since some debug adapters rely on the order
.
then
(()
=>
this
.
sendExceptionBreakpoints
());
}
}
private
sendBreakpoints
(
modelUri
:
uri
):
TPromise
<
void
>
{
private
sendBreakpoints
(
modelUri
:
uri
):
TPromise
<
void
>
{
if
(
!
this
.
session
||
!
this
.
session
.
readyForBreakpoints
)
{
if
(
!
this
.
session
||
!
this
.
session
.
readyForBreakpoints
)
{
return
TPromise
.
as
(
undefined
);
return
TPromise
.
as
(
null
);
}
}
const
breakpointsToSend
=
arrays
.
distinct
(
const
breakpointsToSend
=
arrays
.
distinct
(
...
@@ -810,13 +809,25 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
...
@@ -810,13 +809,25 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
});
});
}
}
private
sendFunctionBreakpoints
():
TPromise
<
void
>
{
if
(
!
this
.
session
||
!
this
.
session
.
readyForBreakpoints
)
{
return
TPromise
.
as
(
null
);
}
const
breakpoints
=
this
.
model
.
getFunctionBreakpoints
().
filter
(
fbp
=>
fbp
.
enabled
);
return
this
.
session
.
setFunctionBreakpoints
({
breakpoints
}).
then
(
response
=>
{
let
index
=
0
;
breakpoints
.
forEach
(
bp
=>
bp
.
verified
=
response
.
body
.
breakpoints
[
index
++
].
verified
);
});
}
private
sendExceptionBreakpoints
():
TPromise
<
any
>
{
private
sendExceptionBreakpoints
():
TPromise
<
any
>
{
if
(
!
this
.
session
||
!
this
.
session
.
readyForBreakpoints
)
{
if
(
!
this
.
session
||
!
this
.
session
.
readyForBreakpoints
)
{
return
TPromise
.
as
(
undefined
);
return
TPromise
.
as
(
null
);
}
}
const
enabledEx
Breakpoint
s
=
this
.
model
.
getExceptionBreakpoints
().
filter
(
exb
=>
exb
.
enabled
);
const
enabledEx
ceptionBp
s
=
this
.
model
.
getExceptionBreakpoints
().
filter
(
exb
=>
exb
.
enabled
);
return
this
.
session
.
setExceptionBreakpoints
({
filters
:
enabledEx
Breakpoint
s
.
map
(
exb
=>
exb
.
name
)
});
return
this
.
session
.
setExceptionBreakpoints
({
filters
:
enabledEx
ceptionBp
s
.
map
(
exb
=>
exb
.
name
)
});
}
}
private
onFileChanges
(
fileChangesEvent
:
FileChangesEvent
):
void
{
private
onFileChanges
(
fileChangesEvent
:
FileChangesEvent
):
void
{
...
...
src/vs/workbench/parts/debug/node/rawDebugSession.ts
浏览文件 @
3f0381cd
...
@@ -136,6 +136,10 @@ export class RawDebugSession extends v8.V8Protocol implements debug.IRawDebugSes
...
@@ -136,6 +136,10 @@ export class RawDebugSession extends v8.V8Protocol implements debug.IRawDebugSes
return
this
.
send
(
'
setBreakpoints
'
,
args
);
return
this
.
send
(
'
setBreakpoints
'
,
args
);
}
}
public
setFunctionBreakpoints
(
args
:
DebugProtocol
.
SetFunctionBreakpointsArguments
):
TPromise
<
DebugProtocol
.
SetFunctionBreakpointsResponse
>
{
return
this
.
send
(
'
setFunctionBreakpoints
'
,
args
);
}
public
setExceptionBreakpoints
(
args
:
DebugProtocol
.
SetExceptionBreakpointsArguments
):
TPromise
<
DebugProtocol
.
SetExceptionBreakpointsResponse
>
{
public
setExceptionBreakpoints
(
args
:
DebugProtocol
.
SetExceptionBreakpointsArguments
):
TPromise
<
DebugProtocol
.
SetExceptionBreakpointsResponse
>
{
return
this
.
send
(
'
setExceptionBreakpoints
'
,
args
);
return
this
.
send
(
'
setExceptionBreakpoints
'
,
args
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录