Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
bf4a478f
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bf4a478f
编写于
10月 28, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: do not surface expression.reference
上级
2634a491
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
14 deletion
+17
-14
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+1
-1
src/vs/workbench/parts/debug/common/debugModel.ts
src/vs/workbench/parts/debug/common/debugModel.ts
+5
-2
src/vs/workbench/parts/debug/electron-browser/debugHover.ts
src/vs/workbench/parts/debug/electron-browser/debugHover.ts
+1
-1
src/vs/workbench/parts/debug/electron-browser/debugViewer.ts
src/vs/workbench/parts/debug/electron-browser/debugViewer.ts
+9
-9
src/vs/workbench/parts/debug/electron-browser/replViewer.ts
src/vs/workbench/parts/debug/electron-browser/replViewer.ts
+1
-1
未找到文件。
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
bf4a478f
...
...
@@ -53,8 +53,8 @@ export interface ITreeElement {
}
export
interface
IExpressionContainer
extends
ITreeElement
{
reference
:
number
;
stackFrame
:
IStackFrame
;
hasChildren
:
boolean
;
getChildren
(
debugService
:
IDebugService
):
TPromise
<
IExpression
[]
>
;
}
...
...
src/vs/workbench/parts/debug/common/debugModel.ts
浏览文件 @
bf4a478f
...
...
@@ -168,6 +168,10 @@ export abstract class ExpressionContainer implements debug.IExpressionContainer
return
this
.
_value
;
}
public
get
hasChildren
():
boolean
{
return
this
.
reference
>
0
;
}
private
fetchVariables
(
start
:
number
,
count
:
number
,
filter
:
'
indexed
'
|
'
named
'
):
TPromise
<
Variable
[]
>
{
return
this
.
stackFrame
.
thread
.
process
.
session
.
variables
({
variablesReference
:
this
.
reference
,
...
...
@@ -296,7 +300,7 @@ export class Variable extends ExpressionContainer implements debug.IExpression {
return
this
.
stackFrame
.
thread
.
process
.
session
.
setVariable
({
name
:
this
.
name
,
value
,
variablesReference
:
this
.
parent
.
reference
variablesReference
:
(
<
ExpressionContainer
>
this
.
parent
)
.
reference
}).
then
(
response
=>
{
if
(
response
&&
response
.
body
)
{
this
.
value
=
response
.
body
.
value
;
...
...
@@ -919,7 +923,6 @@ export class Model implements debug.IModel {
this
.
watchExpressions
.
forEach
(
we
=>
{
we
.
value
=
Expression
.
DEFAULT_VALUE
;
we
.
available
=
false
;
we
.
reference
=
0
;
});
this
.
_onDidChangeWatchExpressions
.
fire
();
...
...
src/vs/workbench/parts/debug/electron-browser/debugHover.ts
浏览文件 @
bf4a478f
...
...
@@ -215,7 +215,7 @@ export class DebugHoverWidget implements editorbrowser.IContentWidget {
this
.
isVisible
=
true
;
this
.
stoleFocus
=
focus
;
if
(
expression
.
reference
===
0
||
forceValueHover
)
{
if
(
!
expression
.
hasChildren
||
forceValueHover
)
{
this
.
complexValueContainer
.
hidden
=
true
;
this
.
valueContainer
.
hidden
=
false
;
viewer
.
renderExpressionValue
(
expression
,
this
.
valueContainer
,
false
,
MAX_VALUE_RENDER_LENGTH_IN_HOVER
);
...
...
src/vs/workbench/parts/debug/electron-browser/debugViewer.ts
浏览文件 @
bf4a478f
...
...
@@ -582,7 +582,7 @@ export class VariablesActionProvider implements IActionProvider {
public
getSecondaryActions
(
tree
:
ITree
,
element
:
any
):
TPromise
<
IAction
[]
>
{
let
actions
:
IAction
[]
=
[];
const
variable
=
<
Variable
>
element
;
if
(
variable
.
reference
===
0
)
{
if
(
!
variable
.
hasChildren
)
{
actions
.
push
(
this
.
instantiationService
.
createInstance
(
SetValueAction
,
SetValueAction
.
ID
,
SetValueAction
.
LABEL
,
variable
));
actions
.
push
(
this
.
instantiationService
.
createInstance
(
CopyValueAction
,
CopyValueAction
.
ID
,
CopyValueAction
.
LABEL
,
variable
));
actions
.
push
(
new
Separator
());
...
...
@@ -609,7 +609,7 @@ export class VariablesDataSource implements IDataSource {
}
let
variable
=
<
Variable
>
element
;
return
variable
.
reference
!==
0
&&
!
equalsIgnoreCase
(
variable
.
value
,
'
null
'
);
return
variable
.
hasChildren
&&
!
equalsIgnoreCase
(
variable
.
value
,
'
null
'
);
}
public
getChildren
(
tree
:
ITree
,
element
:
any
):
TPromise
<
any
>
{
...
...
@@ -733,7 +733,7 @@ export class VariablesController extends BaseDebugController {
// double click on primitive value: open input box to be able to set the value
if
(
element
instanceof
Variable
&&
event
.
detail
===
2
)
{
const
expression
=
<
debug
.
IExpression
>
element
;
if
(
expression
.
reference
===
0
)
{
if
(
!
expression
.
hasChildren
)
{
this
.
debugService
.
getViewModel
().
setSelectedExpression
(
expression
);
}
return
true
;
...
...
@@ -744,7 +744,7 @@ export class VariablesController extends BaseDebugController {
protected
setSelectedExpression
(
tree
:
ITree
,
event
:
KeyboardEvent
):
boolean
{
const
element
=
tree
.
getFocus
();
if
(
element
instanceof
Variable
&&
element
.
reference
===
0
)
{
if
(
element
instanceof
Variable
&&
!
element
.
hasChildren
)
{
this
.
debugService
.
getViewModel
().
setSelectedExpression
(
element
);
return
true
;
}
...
...
@@ -785,7 +785,7 @@ export class WatchExpressionsActionProvider implements IActionProvider {
const
expression
=
<
Expression
>
element
;
actions
.
push
(
this
.
instantiationService
.
createInstance
(
AddWatchExpressionAction
,
AddWatchExpressionAction
.
ID
,
AddWatchExpressionAction
.
LABEL
));
actions
.
push
(
this
.
instantiationService
.
createInstance
(
EditWatchExpressionAction
,
EditWatchExpressionAction
.
ID
,
EditWatchExpressionAction
.
LABEL
,
expression
));
if
(
expression
.
reference
===
0
)
{
if
(
!
expression
.
hasChildren
)
{
actions
.
push
(
this
.
instantiationService
.
createInstance
(
CopyValueAction
,
CopyValueAction
.
ID
,
CopyValueAction
.
LABEL
,
expression
.
value
));
}
actions
.
push
(
new
Separator
());
...
...
@@ -796,7 +796,7 @@ export class WatchExpressionsActionProvider implements IActionProvider {
actions
.
push
(
this
.
instantiationService
.
createInstance
(
AddWatchExpressionAction
,
AddWatchExpressionAction
.
ID
,
AddWatchExpressionAction
.
LABEL
));
if
(
element
instanceof
Variable
)
{
const
variable
=
<
Variable
>
element
;
if
(
variable
.
reference
===
0
)
{
if
(
!
variable
.
hasChildren
)
{
actions
.
push
(
this
.
instantiationService
.
createInstance
(
CopyValueAction
,
CopyValueAction
.
ID
,
CopyValueAction
.
LABEL
,
variable
.
value
));
}
actions
.
push
(
new
Separator
());
...
...
@@ -824,7 +824,7 @@ export class WatchExpressionsDataSource implements IDataSource {
}
const
watchExpression
=
<
Expression
>
element
;
return
watchExpression
.
reference
!==
0
&&
!
equalsIgnoreCase
(
watchExpression
.
value
,
'
null
'
);
return
watchExpression
.
hasChildren
&&
!
equalsIgnoreCase
(
watchExpression
.
value
,
'
null
'
);
}
public
getChildren
(
tree
:
ITree
,
element
:
any
):
TPromise
<
any
>
{
...
...
@@ -956,7 +956,7 @@ export class WatchExpressionsController extends BaseDebugController {
// double click on primitive value: open input box to be able to select and copy value.
if
(
element
instanceof
Expression
&&
event
.
detail
===
2
)
{
const
expression
=
<
debug
.
IExpression
>
element
;
if
(
expression
.
reference
===
0
)
{
if
(
!
expression
.
hasChildren
)
{
this
.
debugService
.
getViewModel
().
setSelectedExpression
(
expression
);
}
return
true
;
...
...
@@ -969,7 +969,7 @@ export class WatchExpressionsController extends BaseDebugController {
const
element
=
tree
.
getFocus
();
if
(
element
instanceof
Expression
)
{
const
watchExpression
=
<
Expression
>
element
;
if
(
watchExpression
.
reference
===
0
)
{
if
(
!
watchExpression
.
hasChildren
)
{
this
.
debugService
.
getViewModel
().
setSelectedExpression
(
watchExpression
);
}
return
true
;
...
...
src/vs/workbench/parts/debug/electron-browser/replViewer.ts
浏览文件 @
bf4a478f
...
...
@@ -218,7 +218,7 @@ export class ReplExpressionsRenderer implements tree.IRenderer {
private
renderInputOutputPair
(
tree
:
tree
.
ITree
,
expression
:
debug
.
IExpression
,
templateData
:
IInputOutputPairTemplateData
):
void
{
templateData
.
input
.
textContent
=
expression
.
name
;
debugviewer
.
renderExpressionValue
(
expression
,
templateData
.
value
,
false
);
if
(
expression
.
reference
>
0
)
{
if
(
expression
.
hasChildren
)
{
templateData
.
annotation
.
className
=
'
annotation octicon octicon-info
'
;
templateData
.
annotation
.
title
=
nls
.
localize
(
'
stateCapture
'
,
"
Object state is captured from first evaluation
"
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录