Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
3a3c6b34
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,发现更多精彩内容 >>
提交
3a3c6b34
编写于
4月 19, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug polish: do not expose sendAllBreakpoints
上级
de63841a
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
21 addition
and
33 deletion
+21
-33
src/vs/workbench/parts/debug/browser/debugViews.ts
src/vs/workbench/parts/debug/browser/debugViews.ts
+2
-2
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+3
-7
src/vs/workbench/parts/debug/common/debugModel.ts
src/vs/workbench/parts/debug/common/debugModel.ts
+4
-6
src/vs/workbench/parts/debug/electron-browser/debugActions.ts
...vs/workbench/parts/debug/electron-browser/debugActions.ts
+2
-2
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+6
-8
src/vs/workbench/parts/debug/test/common/debugModel.test.ts
src/vs/workbench/parts/debug/test/common/debugModel.test.ts
+2
-2
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
+2
-6
未找到文件。
src/vs/workbench/parts/debug/browser/debugViews.ts
浏览文件 @
3a3c6b34
...
...
@@ -249,7 +249,7 @@ export class CallStackView extends viewlet.CollapsibleViewletView {
}
const
sideBySide
=
(
originalEvent
&&
(
originalEvent
.
ctrlKey
||
originalEvent
.
metaKey
));
this
.
debugService
.
openOrReveal
Editor
(
stackFrame
.
source
,
stackFrame
.
lineNumber
,
preserveFocus
,
sideBySide
).
done
(
null
,
errors
.
onUnexpectedError
);
this
.
debugService
.
openOrReveal
Source
(
stackFrame
.
source
,
stackFrame
.
lineNumber
,
preserveFocus
,
sideBySide
).
done
(
null
,
errors
.
onUnexpectedError
);
}
// user clicked on 'Load More Stack Frames', get those stack frames and refresh the tree.
...
...
@@ -393,7 +393,7 @@ export class BreakpointsView extends viewlet.AdaptiveCollapsibleViewletView {
}
const
sideBySide
=
(
originalEvent
&&
(
originalEvent
.
ctrlKey
||
originalEvent
.
metaKey
));
this
.
debugService
.
openOrReveal
Editor
(
breakpoint
.
source
,
breakpoint
.
lineNumber
,
preserveFocus
,
sideBySide
).
done
(
null
,
errors
.
onUnexpectedError
);
this
.
debugService
.
openOrReveal
Source
(
breakpoint
.
source
,
breakpoint
.
lineNumber
,
preserveFocus
,
sideBySide
).
done
(
null
,
errors
.
onUnexpectedError
);
}
}));
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
3a3c6b34
...
...
@@ -308,9 +308,8 @@ export interface IDebugService {
toggleBreakpoint
(
IRawBreakpoint
):
TPromise
<
void
>
;
enableOrDisableAllBreakpoints
(
enabled
:
boolean
):
TPromise
<
void
>
;
toggleEnablement
(
element
:
IEnablement
):
TPromise
<
void
>
;
toggleBreakpointsActivated
(
):
TPromise
<
void
>
;
setBreakpointsActivated
(
activated
:
boolean
):
TPromise
<
void
>
;
removeAllBreakpoints
():
TPromise
<
any
>
;
sendAllBreakpoints
():
TPromise
<
any
>
;
addFunctionBreakpoint
():
void
;
renameFunctionBreakpoint
(
id
:
string
,
newFunctionName
:
string
):
TPromise
<
void
>
;
...
...
@@ -318,10 +317,7 @@ export interface IDebugService {
addReplExpression
(
name
:
string
):
TPromise
<
void
>
;
clearReplExpressions
():
void
;
logToRepl
(
value
:
string
,
severity
?:
severity
):
void
;
logToRepl
(
value
:
{
[
key
:
string
]:
any
},
severity
?:
severity
):
void
;
logToRepl
(
value
:
string
|
{
[
key
:
string
]:
any
},
severity
?:
severity
):
void
;
appendReplOutput
(
value
:
string
,
severity
?:
severity
):
void
;
addWatchExpression
(
name
?:
string
):
TPromise
<
void
>
;
...
...
@@ -356,7 +352,7 @@ export interface IDebugService {
/**
* Opens a new or reveals an already visible editor showing the source.
*/
openOrReveal
Editor
(
source
:
Source
,
lineNumber
:
number
,
preserveFocus
:
boolean
,
sideBySide
:
boolean
):
TPromise
<
any
>
;
openOrReveal
Source
(
source
:
Source
,
lineNumber
:
number
,
preserveFocus
:
boolean
,
sideBySide
:
boolean
):
TPromise
<
any
>
;
}
// Editor interfaces
...
...
src/vs/workbench/parts/debug/common/debugModel.ts
浏览文件 @
3a3c6b34
...
...
@@ -487,8 +487,8 @@ export class Model implements debug.IModel {
return
this
.
breakpointsActivated
;
}
public
toggleBreakpointsActivated
(
):
void
{
this
.
breakpointsActivated
=
!
this
.
breakpointsA
ctivated
;
public
setBreakpointsActivated
(
activated
:
boolean
):
void
{
this
.
breakpointsActivated
=
a
ctivated
;
this
.
_onDidChangeBreakpoints
.
fire
();
}
...
...
@@ -576,9 +576,7 @@ export class Model implements debug.IModel {
.
then
(()
=>
this
.
_onDidChangeREPLElements
.
fire
());
}
public
logToRepl
(
value
:
string
,
severity
?:
severity
):
void
;
public
logToRepl
(
value
:
{
[
key
:
string
]:
any
},
severity
?:
severity
):
void
;
public
logToRepl
(
value
:
any
,
severity
?:
severity
):
void
{
public
logToRepl
(
value
:
string
|
{
[
key
:
string
]:
any
},
severity
?:
severity
):
void
{
let
elements
:
OutputElement
[]
=
[];
let
previousOutput
=
this
.
replElements
.
length
&&
(
<
ValueOutputElement
>
this
.
replElements
[
this
.
replElements
.
length
-
1
]);
...
...
@@ -596,7 +594,7 @@ export class Model implements debug.IModel {
// key-value output
else
{
elements
.
push
(
new
KeyValueOutputElement
(
value
.
prototype
,
value
,
nls
.
localize
(
'
snapshotObj
'
,
"
Only primitive values are shown for this object.
"
)));
elements
.
push
(
new
KeyValueOutputElement
(
(
<
any
>
value
)
.
prototype
,
value
,
nls
.
localize
(
'
snapshotObj
'
,
"
Only primitive values are shown for this object.
"
)));
}
if
(
elements
.
length
)
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugActions.ts
浏览文件 @
3a3c6b34
...
...
@@ -361,7 +361,7 @@ export class ToggleBreakpointsActivatedAction extends AbstractDebugAction {
}
public
run
():
TPromise
<
any
>
{
return
this
.
debugService
.
toggleBreakpointsActivated
(
);
return
this
.
debugService
.
setBreakpointsActivated
(
!
this
.
debugService
.
getModel
().
areBreakpointsActivated
()
);
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
...
...
@@ -379,7 +379,7 @@ export class ReapplyBreakpointsAction extends AbstractDebugAction {
}
public
run
():
TPromise
<
any
>
{
return
this
.
debugService
.
se
ndAllBreakpoints
(
);
return
this
.
debugService
.
se
tBreakpointsActivated
(
true
);
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
3a3c6b34
...
...
@@ -258,7 +258,7 @@ export class DebugService implements debug.IDebugService {
this
.
setFocusedStackFrameAndEvaluate
(
stackFrameToFocus
).
done
(
null
,
errors
.
onUnexpectedError
);
aria
.
alert
(
nls
.
localize
(
'
debuggingPaused
'
,
"
Debugging paused, reason {0}, {1} {2}
"
,
event
.
body
.
reason
,
stackFrameToFocus
.
source
?
stackFrameToFocus
.
source
.
name
:
''
,
stackFrameToFocus
.
lineNumber
));
return
this
.
openOrReveal
Editor
(
stackFrameToFocus
.
source
,
stackFrameToFocus
.
lineNumber
,
false
,
false
);
return
this
.
openOrReveal
Source
(
stackFrameToFocus
.
source
,
stackFrameToFocus
.
lineNumber
,
false
,
false
);
}
else
{
this
.
setFocusedStackFrameAndEvaluate
(
null
).
done
(
null
,
errors
.
onUnexpectedError
);
}
...
...
@@ -467,8 +467,8 @@ export class DebugService implements debug.IDebugService {
return
TPromise
.
join
(
urisToClear
.
map
(
uri
=>
this
.
sendBreakpoints
(
uri
)));
}
public
toggleBreakpointsActivated
(
):
TPromise
<
void
>
{
this
.
model
.
toggleBreakpointsActivated
(
);
public
setBreakpointsActivated
(
activated
:
boolean
):
TPromise
<
void
>
{
this
.
model
.
setBreakpointsActivated
(
activated
);
return
this
.
sendAllBreakpoints
();
}
...
...
@@ -491,9 +491,7 @@ export class DebugService implements debug.IDebugService {
return
this
.
model
.
addReplExpression
(
this
.
session
,
this
.
viewModel
.
getFocusedStackFrame
(),
name
);
}
public
logToRepl
(
value
:
string
,
severity
?:
severity
):
void
;
public
logToRepl
(
value
:
{
[
key
:
string
]:
any
},
severity
?:
severity
):
void
;
public
logToRepl
(
value
:
any
,
severity
?:
severity
):
void
{
public
logToRepl
(
value
:
string
|
{
[
key
:
string
]:
any
},
severity
?:
severity
):
void
{
this
.
model
.
logToRepl
(
value
,
severity
);
}
...
...
@@ -753,7 +751,7 @@ export class DebugService implements debug.IDebugService {
return
this
.
viewModel
;
}
public
openOrReveal
Editor
(
source
:
Source
,
lineNumber
:
number
,
preserveFocus
:
boolean
,
sideBySide
:
boolean
):
TPromise
<
any
>
{
public
openOrReveal
Source
(
source
:
Source
,
lineNumber
:
number
,
preserveFocus
:
boolean
,
sideBySide
:
boolean
):
TPromise
<
any
>
{
const
visibleEditors
=
this
.
editorService
.
getVisibleEditors
();
for
(
let
i
=
0
;
i
<
visibleEditors
.
length
;
i
++
)
{
const
fileInput
=
wbeditorcommon
.
asFileEditorInput
(
visibleEditors
[
i
].
input
);
...
...
@@ -832,7 +830,7 @@ export class DebugService implements debug.IDebugService {
}
}
p
ublic
sendAllBreakpoints
():
TPromise
<
any
>
{
p
rivate
sendAllBreakpoints
():
TPromise
<
any
>
{
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
...
...
src/vs/workbench/parts/debug/test/common/debugModel.test.ts
浏览文件 @
3a3c6b34
...
...
@@ -44,9 +44,9 @@ suite('Debug - Model', () => {
model
.
removeBreakpoints
([
model
.
getBreakpoints
().
pop
()]);
assert
.
equal
(
model
.
getBreakpoints
().
length
,
2
);
model
.
toggleBreakpointsActivated
(
);
model
.
setBreakpointsActivated
(
false
);
assert
.
equal
(
model
.
areBreakpointsActivated
(),
false
);
model
.
toggleBreakpointsActivated
(
);
model
.
setBreakpointsActivated
(
true
);
assert
.
equal
(
model
.
areBreakpointsActivated
(),
true
);
});
...
...
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
浏览文件 @
3a3c6b34
...
...
@@ -51,7 +51,7 @@ export class MockDebugService implements debug.IDebugService {
return
TPromise
.
as
(
null
);
}
public
toggle
BreakpointsActivated
():
TPromise
<
void
>
{
public
set
BreakpointsActivated
():
TPromise
<
void
>
{
return
TPromise
.
as
(
null
);
}
...
...
@@ -59,10 +59,6 @@ export class MockDebugService implements debug.IDebugService {
return
TPromise
.
as
(
null
);
}
public
sendAllBreakpoints
():
TPromise
<
any
>
{
return
TPromise
.
as
(
null
);
}
public
addFunctionBreakpoint
():
void
{}
public
renameFunctionBreakpoint
(
id
:
string
,
newFunctionName
:
string
):
TPromise
<
void
>
{
...
...
@@ -115,7 +111,7 @@ export class MockDebugService implements debug.IDebugService {
return
null
;
}
public
openOrReveal
Editor
(
source
:
Source
,
lineNumber
:
number
,
preserveFocus
:
boolean
,
sideBySide
:
boolean
):
TPromise
<
any
>
{
public
openOrReveal
Source
(
source
:
Source
,
lineNumber
:
number
,
preserveFocus
:
boolean
,
sideBySide
:
boolean
):
TPromise
<
any
>
{
return
TPromise
.
as
(
null
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录