Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
a35559d9
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,发现更多精彩内容 >>
提交
a35559d9
编写于
10月 19, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug model: ordering in file polish
上级
bb194502
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
109 addition
and
110 deletion
+109
-110
src/vs/workbench/parts/debug/common/debugModel.ts
src/vs/workbench/parts/debug/common/debugModel.ts
+109
-110
未找到文件。
src/vs/workbench/parts/debug/common/debugModel.ts
浏览文件 @
a35559d9
...
...
@@ -84,77 +84,6 @@ export function getFullExpressionName(expression: debug.IExpression, sessionType
return
result
;
}
export
class
Thread
implements
debug
.
IThread
{
private
promisedCallStack
:
TPromise
<
debug
.
IStackFrame
[]
>
;
private
cachedCallStack
:
debug
.
IStackFrame
[];
public
stoppedDetails
:
debug
.
IRawStoppedDetails
;
public
stopped
:
boolean
;
constructor
(
private
session
:
debug
.
IRawDebugSession
,
public
name
:
string
,
public
threadId
:
number
)
{
this
.
promisedCallStack
=
undefined
;
this
.
stoppedDetails
=
undefined
;
this
.
cachedCallStack
=
undefined
;
this
.
stopped
=
false
;
}
public
getId
():
string
{
return
`thread:
${
this
.
sessionId
}
:
${
this
.
name
}
:
${
this
.
threadId
}
`
;
}
public
get
sessionId
():
string
{
return
this
.
session
.
getId
();
}
public
clearCallStack
():
void
{
this
.
promisedCallStack
=
undefined
;
this
.
cachedCallStack
=
undefined
;
}
public
getCachedCallStack
():
debug
.
IStackFrame
[]
{
return
this
.
cachedCallStack
;
}
public
getCallStack
(
getAdditionalStackFrames
=
false
):
TPromise
<
debug
.
IStackFrame
[]
>
{
if
(
!
this
.
stopped
)
{
return
TPromise
.
as
([]);
}
if
(
!
this
.
promisedCallStack
)
{
this
.
promisedCallStack
=
this
.
getCallStackImpl
(
0
).
then
(
callStack
=>
{
this
.
cachedCallStack
=
callStack
;
return
callStack
;
});
}
else
if
(
getAdditionalStackFrames
)
{
this
.
promisedCallStack
=
this
.
promisedCallStack
.
then
(
callStackFirstPart
=>
this
.
getCallStackImpl
(
callStackFirstPart
.
length
).
then
(
callStackSecondPart
=>
{
this
.
cachedCallStack
=
callStackFirstPart
.
concat
(
callStackSecondPart
);
return
this
.
cachedCallStack
;
}));
}
return
this
.
promisedCallStack
;
}
private
getCallStackImpl
(
startFrame
:
number
):
TPromise
<
debug
.
IStackFrame
[]
>
{
return
this
.
session
.
stackTrace
({
threadId
:
this
.
threadId
,
startFrame
,
levels
:
20
}).
then
(
response
=>
{
if
(
!
response
||
!
response
.
body
)
{
return
[];
}
this
.
stoppedDetails
.
totalFrames
=
response
.
body
.
totalFrames
;
return
response
.
body
.
stackFrames
.
map
((
rsf
,
level
)
=>
{
if
(
!
rsf
)
{
return
new
StackFrame
(
this
.
session
,
this
.
threadId
,
0
,
new
Source
({
name
:
UNKNOWN_SOURCE_LABEL
},
false
),
nls
.
localize
(
'
unknownStack
'
,
"
Unknown stack location
"
),
undefined
,
undefined
);
}
return
new
StackFrame
(
this
.
session
,
this
.
threadId
,
rsf
.
id
,
rsf
.
source
?
new
Source
(
rsf
.
source
)
:
new
Source
({
name
:
UNKNOWN_SOURCE_LABEL
},
false
),
rsf
.
name
,
rsf
.
line
,
rsf
.
column
);
});
},
(
err
:
Error
)
=>
{
this
.
stoppedDetails
.
framesErrorMessage
=
err
.
message
;
return
[];
});
}
}
export
class
OutputElement
implements
debug
.
ITreeElement
{
private
static
ID_COUNTER
=
0
;
...
...
@@ -413,60 +342,74 @@ export class StackFrame implements debug.IStackFrame {
}
}
export
class
Breakpoint
implements
debug
.
IBreakpoint
{
public
lineNumber
:
number
;
public
verified
:
boolean
;
public
idFromAdapter
:
number
;
public
message
:
string
;
private
id
:
string
;
export
class
Thread
implements
debug
.
IThread
{
private
promisedCallStack
:
TPromise
<
debug
.
IStackFrame
[]
>
;
private
cachedCallStack
:
debug
.
IStackFrame
[];
public
stoppedDetails
:
debug
.
IRawStoppedDetails
;
public
stopped
:
boolean
;
constructor
(
public
source
:
Source
,
public
desiredLineNumber
:
number
,
public
enabled
:
boolean
,
public
condition
:
string
,
public
hitCondition
:
string
)
{
if
(
enabled
===
undefined
)
{
this
.
enabled
=
true
;
}
this
.
lineNumber
=
this
.
desiredLineNumber
;
this
.
verified
=
false
;
this
.
id
=
uuid
.
generateUuid
();
constructor
(
private
session
:
debug
.
IRawDebugSession
,
public
name
:
string
,
public
threadId
:
number
)
{
this
.
promisedCallStack
=
undefined
;
this
.
stoppedDetails
=
undefined
;
this
.
cachedCallStack
=
undefined
;
this
.
stopped
=
false
;
}
public
getId
():
string
{
return
this
.
id
;
return
`thread:
${
this
.
sessionId
}
:
${
this
.
name
}
:
${
this
.
threadId
}
`
;
}
}
export
class
FunctionBreakpoint
implements
debug
.
IFunctionBreakpoint
{
private
id
:
string
;
public
verified
:
boolean
;
public
idFromAdapter
:
number
;
public
get
sessionId
():
string
{
return
this
.
session
.
getId
();
}
constructor
(
public
name
:
string
,
public
enabled
:
boolean
,
public
hitCondition
:
string
)
{
this
.
verified
=
false
;
this
.
id
=
uuid
.
generateUuid
()
;
public
clearCallStack
():
void
{
this
.
promisedCallStack
=
undefined
;
this
.
cachedCallStack
=
undefined
;
}
public
get
Id
():
string
{
return
this
.
id
;
public
get
CachedCallStack
():
debug
.
IStackFrame
[]
{
return
this
.
cachedCallStack
;
}
}
export
class
ExceptionBreakpoint
implements
debug
.
IExceptionBreakpoint
{
public
getCallStack
(
getAdditionalStackFrames
=
false
):
TPromise
<
debug
.
IStackFrame
[]
>
{
if
(
!
this
.
stopped
)
{
return
TPromise
.
as
([]);
}
private
id
:
string
;
if
(
!
this
.
promisedCallStack
)
{
this
.
promisedCallStack
=
this
.
getCallStackImpl
(
0
).
then
(
callStack
=>
{
this
.
cachedCallStack
=
callStack
;
return
callStack
;
});
}
else
if
(
getAdditionalStackFrames
)
{
this
.
promisedCallStack
=
this
.
promisedCallStack
.
then
(
callStackFirstPart
=>
this
.
getCallStackImpl
(
callStackFirstPart
.
length
).
then
(
callStackSecondPart
=>
{
this
.
cachedCallStack
=
callStackFirstPart
.
concat
(
callStackSecondPart
);
return
this
.
cachedCallStack
;
}));
}
constructor
(
public
filter
:
string
,
public
label
:
string
,
public
enabled
:
boolean
)
{
this
.
id
=
uuid
.
generateUuid
();
return
this
.
promisedCallStack
;
}
public
getId
():
string
{
return
this
.
id
;
private
getCallStackImpl
(
startFrame
:
number
):
TPromise
<
debug
.
IStackFrame
[]
>
{
return
this
.
session
.
stackTrace
({
threadId
:
this
.
threadId
,
startFrame
,
levels
:
20
}).
then
(
response
=>
{
if
(
!
response
||
!
response
.
body
)
{
return
[];
}
this
.
stoppedDetails
.
totalFrames
=
response
.
body
.
totalFrames
;
return
response
.
body
.
stackFrames
.
map
((
rsf
,
level
)
=>
{
if
(
!
rsf
)
{
return
new
StackFrame
(
this
.
session
,
this
.
threadId
,
0
,
new
Source
({
name
:
UNKNOWN_SOURCE_LABEL
},
false
),
nls
.
localize
(
'
unknownStack
'
,
"
Unknown stack location
"
),
undefined
,
undefined
);
}
return
new
StackFrame
(
this
.
session
,
this
.
threadId
,
rsf
.
id
,
rsf
.
source
?
new
Source
(
rsf
.
source
)
:
new
Source
({
name
:
UNKNOWN_SOURCE_LABEL
},
false
),
rsf
.
name
,
rsf
.
line
,
rsf
.
column
);
});
},
(
err
:
Error
)
=>
{
this
.
stoppedDetails
.
framesErrorMessage
=
err
.
message
;
return
[];
});
}
}
...
...
@@ -545,7 +488,63 @@ class DebugSession {
}
});
}
}
export
class
Breakpoint
implements
debug
.
IBreakpoint
{
public
lineNumber
:
number
;
public
verified
:
boolean
;
public
idFromAdapter
:
number
;
public
message
:
string
;
private
id
:
string
;
constructor
(
public
source
:
Source
,
public
desiredLineNumber
:
number
,
public
enabled
:
boolean
,
public
condition
:
string
,
public
hitCondition
:
string
)
{
if
(
enabled
===
undefined
)
{
this
.
enabled
=
true
;
}
this
.
lineNumber
=
this
.
desiredLineNumber
;
this
.
verified
=
false
;
this
.
id
=
uuid
.
generateUuid
();
}
public
getId
():
string
{
return
this
.
id
;
}
}
export
class
FunctionBreakpoint
implements
debug
.
IFunctionBreakpoint
{
private
id
:
string
;
public
verified
:
boolean
;
public
idFromAdapter
:
number
;
constructor
(
public
name
:
string
,
public
enabled
:
boolean
,
public
hitCondition
:
string
)
{
this
.
verified
=
false
;
this
.
id
=
uuid
.
generateUuid
();
}
public
getId
():
string
{
return
this
.
id
;
}
}
export
class
ExceptionBreakpoint
implements
debug
.
IExceptionBreakpoint
{
private
id
:
string
;
constructor
(
public
filter
:
string
,
public
label
:
string
,
public
enabled
:
boolean
)
{
this
.
id
=
uuid
.
generateUuid
();
}
public
getId
():
string
{
return
this
.
id
;
}
}
export
class
Model
implements
debug
.
IModel
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录