Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
69186de4
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,发现更多精彩内容 >>
提交
69186de4
编写于
8月 11, 2020
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
callStack: change "load more frame" to "load all frames"
fixes #102048
上级
14dabea7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
31 deletion
+32
-31
src/vs/workbench/contrib/debug/browser/callStackView.ts
src/vs/workbench/contrib/debug/browser/callStackView.ts
+31
-30
src/vs/workbench/contrib/debug/browser/media/debugViewlet.css
...vs/workbench/contrib/debug/browser/media/debugViewlet.css
+1
-1
未找到文件。
src/vs/workbench/contrib/debug/browser/callStackView.ts
浏览文件 @
69186de4
...
...
@@ -222,7 +222,7 @@ export class CallStackView extends ViewPane {
new
ThreadsRenderer
(
this
.
instantiationService
),
this
.
instantiationService
.
createInstance
(
StackFramesRenderer
),
new
ErrorsRenderer
(),
new
Load
More
Renderer
(
this
.
themeService
),
new
Load
All
Renderer
(
this
.
themeService
),
new
ShowMoreRenderer
(
this
.
themeService
)
],
this
.
dataSource
,
{
accessibilityProvider
:
new
CallStackAccessibilityProvider
(),
...
...
@@ -252,7 +252,7 @@ export class CallStackView extends ViewPane {
return
e
;
}
if
(
e
instanceof
ThreadAndSessionIds
)
{
return
Load
More
Renderer
.
LABEL
;
return
Load
All
Renderer
.
LABEL
;
}
return
nls
.
localize
(
'
showMoreStackFrames2
'
,
"
Show More Stack Frames
"
);
...
...
@@ -273,7 +273,7 @@ export class CallStackView extends ViewPane {
this
.
tree
.
setInput
(
this
.
debugService
.
getModel
());
this
.
_register
(
this
.
tree
.
onDidOpen
(
e
=>
{
this
.
_register
(
this
.
tree
.
onDidOpen
(
async
e
=>
{
if
(
this
.
ignoreSelectionChangedEvent
)
{
return
;
}
...
...
@@ -302,8 +302,11 @@ export class CallStackView extends ViewPane {
const
session
=
this
.
debugService
.
getModel
().
getSession
(
element
.
sessionId
);
const
thread
=
session
&&
session
.
getThread
(
element
.
threadId
);
if
(
thread
)
{
(
<
Thread
>
thread
).
fetchCallStack
()
.
then
(()
=>
this
.
tree
.
updateChildren
());
const
totalFrames
=
thread
.
stoppedDetails
?.
totalFrames
;
const
remainingFramesCount
=
typeof
totalFrames
===
'
number
'
?
(
totalFrames
-
thread
.
getCallStack
().
length
)
:
undefined
;
// Get all the remaining frames
await
(
<
Thread
>
thread
).
fetchCallStack
(
remainingFramesCount
);
await
this
.
tree
.
updateChildren
();
}
}
if
(
element
instanceof
Array
)
{
...
...
@@ -704,18 +707,18 @@ class ErrorsRenderer implements ICompressibleTreeRenderer<string, FuzzyScore, IE
}
}
class
Load
More
Renderer
implements
ICompressibleTreeRenderer
<
ThreadAndSessionIds
,
FuzzyScore
,
ILabelTemplateData
>
{
static
readonly
ID
=
'
load
More
'
;
static
readonly
LABEL
=
nls
.
localize
(
'
load
MoreStackFrames
'
,
"
Load More
Stack Frames
"
);
class
Load
All
Renderer
implements
ICompressibleTreeRenderer
<
ThreadAndSessionIds
,
FuzzyScore
,
ILabelTemplateData
>
{
static
readonly
ID
=
'
load
All
'
;
static
readonly
LABEL
=
nls
.
localize
(
'
load
AllStackFrames
'
,
"
Load All
Stack Frames
"
);
constructor
(
private
readonly
themeService
:
IThemeService
)
{
}
get
templateId
():
string
{
return
Load
More
Renderer
.
ID
;
return
Load
All
Renderer
.
ID
;
}
renderTemplate
(
container
:
HTMLElement
):
ILabelTemplateData
{
const
label
=
dom
.
append
(
container
,
$
(
'
.load-
more
'
));
const
label
=
dom
.
append
(
container
,
$
(
'
.load-
all
'
));
const
toDispose
=
attachStylerCallback
(
this
.
themeService
,
{
textLinkForeground
},
colors
=>
{
if
(
colors
.
textLinkForeground
)
{
label
.
style
.
color
=
colors
.
textLinkForeground
.
toString
();
...
...
@@ -726,7 +729,7 @@ class LoadMoreRenderer implements ICompressibleTreeRenderer<ThreadAndSessionIds,
}
renderElement
(
element
:
ITreeNode
<
ThreadAndSessionIds
,
FuzzyScore
>
,
index
:
number
,
data
:
ILabelTemplateData
):
void
{
data
.
label
.
textContent
=
Load
More
Renderer
.
LABEL
;
data
.
label
.
textContent
=
Load
All
Renderer
.
LABEL
;
}
renderCompressedElements
(
node
:
ITreeNode
<
ICompressedTreeNode
<
ThreadAndSessionIds
>
,
FuzzyScore
>
,
index
:
number
,
templateData
:
ILabelTemplateData
,
height
:
number
|
undefined
):
void
{
...
...
@@ -804,7 +807,7 @@ class CallStackDelegate implements IListVirtualDelegate<CallStackItem> {
return
ErrorsRenderer
.
ID
;
}
if
(
element
instanceof
ThreadAndSessionIds
)
{
return
Load
More
Renderer
.
ID
;
return
Load
All
Renderer
.
ID
;
}
// element instanceof Array
...
...
@@ -899,29 +902,27 @@ class CallStackDataSource implements IAsyncDataSource<IDebugModel, CallStackItem
});
}
private
getThreadCallstack
(
thread
:
Thread
):
Promise
<
Array
<
IStackFrame
|
string
|
ThreadAndSessionIds
>>
{
private
async
getThreadCallstack
(
thread
:
Thread
):
Promise
<
Array
<
IStackFrame
|
string
|
ThreadAndSessionIds
>>
{
let
callStack
:
any
[]
=
thread
.
getCallStack
();
let
callStackPromise
:
Promise
<
any
>
=
Promise
.
resolve
(
null
);
if
(
!
callStack
||
!
callStack
.
length
)
{
callStackPromise
=
thread
.
fetchCallStack
().
then
(()
=>
callStack
=
thread
.
getCallStack
());
await
thread
.
fetchCallStack
();
callStack
=
thread
.
getCallStack
();
}
return
callStackPromise
.
then
(()
=>
{
if
(
callStack
.
length
===
1
&&
thread
.
session
.
capabilities
.
supportsDelayedStackTraceLoading
&&
thread
.
stoppedDetails
&&
thread
.
stoppedDetails
.
totalFrames
&&
thread
.
stoppedDetails
.
totalFrames
>
1
)
{
// To reduce flashing of the call stack view simply append the stale call stack
// once we have the correct data the tree will refresh and we will no longer display it.
callStack
=
callStack
.
concat
(
thread
.
getStaleCallStack
().
slice
(
1
));
}
if
(
callStack
.
length
===
1
&&
thread
.
session
.
capabilities
.
supportsDelayedStackTraceLoading
&&
thread
.
stoppedDetails
&&
thread
.
stoppedDetails
.
totalFrames
&&
thread
.
stoppedDetails
.
totalFrames
>
1
)
{
// To reduce flashing of the call stack view simply append the stale call stack
// once we have the correct data the tree will refresh and we will no longer display it.
callStack
=
callStack
.
concat
(
thread
.
getStaleCallStack
().
slice
(
1
));
}
if
(
thread
.
stoppedDetails
&&
thread
.
stoppedDetails
.
framesErrorMessage
)
{
callStack
=
callStack
.
concat
([
thread
.
stoppedDetails
.
framesErrorMessage
]);
}
if
(
thread
.
stoppedDetails
&&
thread
.
stoppedDetails
.
totalFrames
&&
thread
.
stoppedDetails
.
totalFrames
>
callStack
.
length
&&
callStack
.
length
>
1
)
{
callStack
=
callStack
.
concat
([
new
ThreadAndSessionIds
(
thread
.
session
.
getId
(),
thread
.
threadId
)]);
}
if
(
thread
.
stoppedDetails
&&
thread
.
stoppedDetails
.
framesErrorMessage
)
{
callStack
=
callStack
.
concat
([
thread
.
stoppedDetails
.
framesErrorMessage
]);
}
if
(
thread
.
stoppedDetails
&&
thread
.
stoppedDetails
.
totalFrames
&&
thread
.
stoppedDetails
.
totalFrames
>
callStack
.
length
&&
callStack
.
length
>
1
)
{
callStack
=
callStack
.
concat
([
new
ThreadAndSessionIds
(
thread
.
session
.
getId
(),
thread
.
threadId
)]);
}
return
callStack
;
});
return
callStack
;
}
}
...
...
@@ -949,7 +950,7 @@ class CallStackAccessibilityProvider implements IListAccessibilityProvider<CallS
}
// element instanceof ThreadAndSessionIds
return
nls
.
localize
(
'
loadMoreStackFrames
'
,
"
Load More Stack Frames
"
)
;
return
LoadAllRenderer
.
LABEL
;
}
}
...
...
src/vs/workbench/contrib/debug/browser/media/debugViewlet.css
浏览文件 @
69186de4
...
...
@@ -211,7 +211,7 @@
margin-left
:
0.8em
;
}
.debug-pane
.debug-call-stack
.load-
more
{
.debug-pane
.debug-call-stack
.load-
all
{
text-align
:
center
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录