Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
bcc74519
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
bcc74519
编写于
11月 11, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: improve breakpoint pane, use flex
上级
4b14c1fc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
52 addition
and
33 deletion
+52
-33
src/vs/workbench/parts/debug/browser/media/debugViewlet.css
src/vs/workbench/parts/debug/browser/media/debugViewlet.css
+22
-10
src/vs/workbench/parts/debug/electron-browser/debugViewer.ts
src/vs/workbench/parts/debug/electron-browser/debugViewer.ts
+7
-3
src/vs/workbench/parts/debug/electron-browser/debugViews.ts
src/vs/workbench/parts/debug/electron-browser/debugViews.ts
+23
-20
未找到文件。
src/vs/workbench/parts/debug/browser/media/debugViewlet.css
浏览文件 @
bcc74519
...
...
@@ -76,9 +76,8 @@
}
.debug-viewlet
.monaco-tree
.monaco-tree-row
.content
.monaco-action-bar
{
float
:
right
;
display
:
none
;
margin-right
:
12px
;
visibility
:
hidden
;
flex-shrink
:
0
;
}
.debug-viewlet
.monaco-tree
.monaco-tree-row
.content
.monaco-action-bar
.action-label
{
...
...
@@ -89,7 +88,7 @@
.debug-viewlet
.monaco-tree
.monaco-tree-row
:hover
.content
.monaco-action-bar
,
.debug-viewlet
.monaco-tree.focused
.monaco-tree-row.focused
.content
.monaco-action-bar
{
display
:
block
;
visibility
:
visible
;
}
.debug-viewlet
.disabled
{
...
...
@@ -160,7 +159,6 @@
overflow
:
hidden
;
text-overflow
:
ellipsis
;
padding-right
:
0.8em
;
margin-right
:
0.2em
;
}
.debug-viewlet
.debug-call-stack
.stack-frame
>
.file
{
...
...
@@ -235,6 +233,7 @@
.debug-viewlet
.inputBoxContainer
{
box-sizing
:
border-box
;
flex-grow
:
1
;
}
.debug-viewlet
.debug-watch
.monaco-inputbox
{
...
...
@@ -277,19 +276,32 @@
/* Breakpoints */
.debug-viewlet
.debug-breakpoints
.breakpoint
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
flex
;
padding-right
:
0.8em
;
flex
:
1
;
align-items
:
center
;
}
.debug-viewlet
.debug-breakpoints
.breakpoint.exception
{
padding-left
:
16px
;
}
.debug-viewlet
.debug-breakpoints
.breakpoint
input
{
flex-shrink
:
0
;
}
.debug-viewlet
.debug-breakpoints
.breakpoint
>
.file-path
{
opacity
:
0.7
;
font-size
:
0.9em
;
margin-left
:
0.8em
;
flex
:
1
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.monaco-workbench.windows
debug-viewlet
.debug-breakpoints
.breakpoint
>
.checkbox
,
.
monaco-workbench.linux
debug-viewlet
.debug-breakpoints
.breakpoint
>
.checkbox
{
vertical-align
:
middle
;
.
debug-viewlet
.monaco-tree
.monaco-tree-row
.breakpoint
.monaco-action-bar
.action-label
{
margin-right
:
0px
;
}
.debug-viewlet
.debug-action.remove
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugViewer.ts
浏览文件 @
bcc74519
...
...
@@ -1182,12 +1182,12 @@ export class BreakpointsRenderer implements IRenderer {
public
renderTemplate
(
tree
:
ITree
,
templateId
:
string
,
container
:
HTMLElement
):
any
{
const
data
:
IBreakpointTemplateData
=
Object
.
create
(
null
);
data
.
breakpoint
=
dom
.
append
(
container
,
$
(
'
.breakpoint
'
));
if
(
templateId
===
BreakpointsRenderer
.
BREAKPOINT_TEMPLATE_ID
||
templateId
===
BreakpointsRenderer
.
FUNCTION_BREAKPOINT_TEMPLATE_ID
)
{
data
.
actionBar
=
new
ActionBar
(
container
,
{
actionRunner
:
this
.
actionRunner
});
data
.
actionBar
=
new
ActionBar
(
data
.
breakpoint
,
{
actionRunner
:
this
.
actionRunner
});
data
.
actionBar
.
push
(
this
.
actionProvider
.
getBreakpointActions
(),
{
icon
:
true
,
label
:
false
});
}
data
.
breakpoint
=
dom
.
append
(
container
,
$
(
'
.breakpoint
'
));
data
.
toDisposeBeforeRender
=
[];
data
.
checkbox
=
<
HTMLInputElement
>
$
(
'
input
'
);
...
...
@@ -1198,8 +1198,12 @@ export class BreakpointsRenderer implements IRenderer {
data
.
name
=
dom
.
append
(
data
.
breakpoint
,
$
(
'
span.name
'
));
if
(
templateId
===
BreakpointsRenderer
.
BREAKPOINT_TEMPLATE_ID
)
{
data
.
lineNumber
=
dom
.
append
(
data
.
breakpoint
,
$
(
'
span.line-number
'
));
data
.
filePath
=
dom
.
append
(
data
.
breakpoint
,
$
(
'
span.file-path
'
));
const
lineNumberContainer
=
dom
.
append
(
data
.
breakpoint
,
$
(
'
.line-number-container
'
));
data
.
lineNumber
=
dom
.
append
(
lineNumberContainer
,
$
(
'
span.line-number
'
));
}
if
(
templateId
===
BreakpointsRenderer
.
EXCEPTION_BREAKPOINT_TEMPLATE_ID
)
{
dom
.
addClass
(
data
.
breakpoint
,
'
exception
'
);
}
return
data
;
...
...
src/vs/workbench/parts/debug/electron-browser/debugViews.ts
浏览文件 @
bcc74519
...
...
@@ -13,11 +13,11 @@ import * as errors from 'vs/base/common/errors';
import
{
EventType
}
from
'
vs/base/common/events
'
;
import
{
IActionRunner
,
IAction
}
from
'
vs/base/common/actions
'
;
import
{
prepareActions
}
from
'
vs/workbench/browser/actionBarRegistry
'
;
import
{
I
TreeOptions
,
I
HighlightEvent
,
ITree
}
from
'
vs/base/parts/tree/browser/tree
'
;
import
{
IHighlightEvent
,
ITree
}
from
'
vs/base/parts/tree/browser/tree
'
;
import
{
Tree
}
from
'
vs/base/parts/tree/browser/treeImpl
'
;
import
{
CollapsibleState
}
from
'
vs/base/browser/ui/splitview/splitview
'
;
import
{
CollapsibleViewletView
,
AdaptiveCollapsibleViewletView
,
CollapseAction
}
from
'
vs/workbench/browser/viewlet
'
;
import
*
as
debug
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
IDebugService
,
State
,
IBreakpoint
,
IExpression
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
Expression
,
Variable
,
ExceptionBreakpoint
,
FunctionBreakpoint
,
Thread
}
from
'
vs/workbench/parts/debug/common/debugModel
'
;
import
*
as
viewer
from
'
vs/workbench/parts/debug/electron-browser/debugViewer
'
;
import
{
AddWatchExpressionAction
,
RemoveAllWatchExpressionsAction
,
AddFunctionBreakpointAction
,
ToggleBreakpointsActivatedAction
,
RemoveAllBreakpointsAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
...
...
@@ -27,15 +27,6 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
IDebugService
=
debug
.
IDebugService
;
const
debugTreeOptions
=
(
ariaLabel
:
string
)
=>
{
return
<
ITreeOptions
>
{
twistiePixels
:
20
,
ariaLabel
};
};
function
renderViewTree
(
container
:
HTMLElement
):
HTMLElement
{
const
treeContainer
=
document
.
createElement
(
'
div
'
);
dom
.
addClass
(
treeContainer
,
'
debug-view-content
'
);
...
...
@@ -95,7 +86,10 @@ export class VariablesView extends CollapsibleViewletView {
renderer
:
this
.
instantiationService
.
createInstance
(
viewer
.
VariablesRenderer
),
accessibilityProvider
:
new
viewer
.
VariablesAccessibilityProvider
(),
controller
:
new
viewer
.
VariablesController
(
this
.
debugService
,
this
.
contextMenuService
,
new
viewer
.
VariablesActionProvider
(
this
.
instantiationService
))
},
debugTreeOptions
(
nls
.
localize
(
'
variablesAriaTreeLabel
'
,
"
Debug Variables
"
)));
},
{
ariaLabel
:
nls
.
localize
(
'
variablesAriaTreeLabel
'
,
"
Debug Variables
"
),
twistiePixels
:
20
});
const
viewModel
=
this
.
debugService
.
getViewModel
();
...
...
@@ -115,7 +109,7 @@ export class VariablesView extends CollapsibleViewletView {
}));
this
.
toDispose
.
push
(
this
.
debugService
.
onDidChangeState
(()
=>
{
const
state
=
this
.
debugService
.
state
;
collapseAction
.
enabled
=
state
===
debug
.
State
.
Running
||
state
===
debug
.
State
.
Stopped
;
collapseAction
.
enabled
=
state
===
State
.
Running
||
state
===
State
.
Stopped
;
}));
this
.
toDispose
.
push
(
this
.
debugService
.
getViewModel
().
onDidSelectExpression
(
expression
=>
{
...
...
@@ -144,7 +138,7 @@ export class WatchExpressionsView extends CollapsibleViewletView {
private
static
MEMENTO
=
'
watchexpressionsview.memento
'
;
private
onWatchExpressionsUpdatedScheduler
:
RunOnceScheduler
;
private
toReveal
:
debug
.
IExpression
;
private
toReveal
:
IExpression
;
constructor
(
actionRunner
:
IActionRunner
,
...
...
@@ -189,7 +183,10 @@ export class WatchExpressionsView extends CollapsibleViewletView {
accessibilityProvider
:
new
viewer
.
WatchExpressionsAccessibilityProvider
(),
controller
:
new
viewer
.
WatchExpressionsController
(
this
.
debugService
,
this
.
contextMenuService
,
actionProvider
),
dnd
:
this
.
instantiationService
.
createInstance
(
viewer
.
WatchExpressionsDragAndDrop
)
},
debugTreeOptions
(
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
watchAriaTreeLabel
'
},
"
Debug Watch Expressions
"
)));
},
{
ariaLabel
:
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
watchAriaTreeLabel
'
},
"
Debug Watch Expressions
"
),
twistiePixels
:
20
});
this
.
tree
.
setInput
(
this
.
debugService
.
getModel
());
...
...
@@ -304,7 +301,10 @@ export class CallStackView extends CollapsibleViewletView {
renderer
:
this
.
instantiationService
.
createInstance
(
viewer
.
CallStackRenderer
),
accessibilityProvider
:
this
.
instantiationService
.
createInstance
(
viewer
.
CallstackAccessibilityProvider
),
controller
:
new
viewer
.
CallStackController
(
this
.
debugService
,
this
.
contextMenuService
,
actionProvider
)
},
debugTreeOptions
(
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
callStackAriaLabel
'
},
"
Debug Call Stack
"
)));
},
{
ariaLabel
:
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
callStackAriaLabel
'
},
"
Debug Call Stack
"
),
twistiePixels
:
20
});
this
.
toDispose
.
push
(
this
.
debugService
.
getModel
().
onDidChangeCallStack
(()
=>
{
if
(
!
this
.
onCallStackChangeScheduler
.
isScheduled
())
{
...
...
@@ -313,7 +313,7 @@ export class CallStackView extends CollapsibleViewletView {
}));
// Schedule the update of the call stack tree if the viewlet is opened after a session started #14684
if
(
this
.
debugService
.
state
===
debug
.
State
.
Stopped
)
{
if
(
this
.
debugService
.
state
===
State
.
Stopped
)
{
this
.
onCallStackChangeScheduler
.
schedule
();
}
}
...
...
@@ -363,8 +363,8 @@ export class BreakpointsView extends AdaptiveCollapsibleViewletView {
controller
:
new
viewer
.
BreakpointsController
(
this
.
debugService
,
this
.
contextMenuService
,
actionProvider
),
sorter
:
{
compare
(
tree
:
ITree
,
element
:
any
,
otherElement
:
any
):
number
{
const
first
=
<
debug
.
IBreakpoint
>
element
;
const
second
=
<
debug
.
IBreakpoint
>
otherElement
;
const
first
=
<
IBreakpoint
>
element
;
const
second
=
<
IBreakpoint
>
otherElement
;
if
(
first
instanceof
ExceptionBreakpoint
)
{
return
-
1
;
}
...
...
@@ -385,7 +385,10 @@ export class BreakpointsView extends AdaptiveCollapsibleViewletView {
return
first
.
lineNumber
-
second
.
lineNumber
;
}
}
},
debugTreeOptions
(
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
breakpointsAriaTreeLabel
'
},
"
Debug Breakpoints
"
)));
},
{
ariaLabel
:
nls
.
localize
({
comment
:
[
'
Debug is a noun in this context, not a verb.
'
],
key
:
'
breakpointsAriaTreeLabel
'
},
"
Debug Breakpoints
"
),
twistiePixels
:
0
});
const
debugModel
=
this
.
debugService
.
getModel
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录