Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
7a0b01b2
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,发现更多精彩内容 >>
提交
7a0b01b2
编写于
4月 19, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug polish: api renaming, removeBreakpoints takes id
上级
8324ab0c
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
40 addition
and
30 deletion
+40
-30
src/vs/workbench/parts/debug/browser/debugViewer.ts
src/vs/workbench/parts/debug/browser/debugViewer.ts
+2
-2
src/vs/workbench/parts/debug/browser/repl.ts
src/vs/workbench/parts/debug/browser/repl.ts
+1
-1
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+14
-5
src/vs/workbench/parts/debug/common/debugModel.ts
src/vs/workbench/parts/debug/common/debugModel.ts
+3
-3
src/vs/workbench/parts/debug/electron-browser/debugActions.ts
...vs/workbench/parts/debug/electron-browser/debugActions.ts
+5
-5
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+9
-8
src/vs/workbench/parts/debug/test/common/debugModel.test.ts
src/vs/workbench/parts/debug/test/common/debugModel.test.ts
+3
-3
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
+3
-3
未找到文件。
src/vs/workbench/parts/debug/browser/debugViewer.ts
浏览文件 @
7a0b01b2
...
...
@@ -100,7 +100,7 @@ function renderRenameBox(debugService: debug.IDebugService, contextViewService:
if
(
element
instanceof
model
.
Expression
&&
renamed
&&
inputBox
.
value
)
{
debugService
.
renameWatchExpression
(
element
.
getId
(),
inputBox
.
value
).
done
(
null
,
errors
.
onUnexpectedError
);
}
else
if
(
element
instanceof
model
.
Expression
&&
!
element
.
name
)
{
debugService
.
clear
WatchExpressions
(
element
.
getId
());
debugService
.
remove
WatchExpressions
(
element
.
getId
());
}
else
if
(
element
instanceof
model
.
FunctionBreakpoint
&&
renamed
&&
inputBox
.
value
)
{
debugService
.
renameFunctionBreakpoint
(
element
.
getId
(),
inputBox
.
value
).
done
(
null
,
errors
.
onUnexpectedError
);
}
else
if
(
element
instanceof
model
.
FunctionBreakpoint
&&
!
element
.
name
)
{
...
...
@@ -730,7 +730,7 @@ export class WatchExpressionsController extends BaseDebugController {
const
element
=
tree
.
getFocus
();
if
(
element
instanceof
model
.
Expression
)
{
const
we
=
<
model
.
Expression
>
element
;
this
.
debugService
.
clear
WatchExpressions
(
we
.
getId
());
this
.
debugService
.
remove
WatchExpressions
(
we
.
getId
());
return
true
;
}
...
...
src/vs/workbench/parts/debug/browser/repl.ts
浏览文件 @
7a0b01b2
...
...
@@ -73,7 +73,7 @@ export class Repl extends Panel {
}
private
registerListeners
():
void
{
this
.
toDispose
.
push
(
this
.
debugService
.
getModel
().
onDidChangeR
EPL
Elements
(()
=>
{
this
.
toDispose
.
push
(
this
.
debugService
.
getModel
().
onDidChangeR
epl
Elements
(()
=>
{
this
.
onReplElementsUpdated
();
}));
this
.
toDispose
.
push
(
this
.
eventService
.
addListener2
(
EventType
.
COMPOSITE_OPENED
,
(
e
:
CompositeEvent
)
=>
{
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
7a0b01b2
...
...
@@ -182,7 +182,7 @@ export interface IModel extends ITreeElement {
onDidChangeBreakpoints
:
Event
<
void
>
;
onDidChangeCallStack
:
Event
<
void
>
;
onDidChangeWatchExpressions
:
Event
<
IExpression
>
;
onDidChangeR
EPL
Elements
:
Event
<
void
>
;
onDidChangeR
epl
Elements
:
Event
<
void
>
;
};
// service enums
...
...
@@ -302,27 +302,36 @@ export interface IDebugService {
setFocusedStackFrameAndEvaluate
(
focusedStackFrame
:
IStackFrame
):
TPromise
<
void
>
;
/**
*
Sets breakpoints for a model. Does not send them to the adapter
.
*
General breakpoints manipulation
.
*/
setBreakpointsForModel
(
modelUri
:
uri
,
rawData
:
IRawBreakpoint
[]):
void
;
toggleBreakpoint
(
IRawBreakpoint
):
TPromise
<
void
>
;
enableOrDisableAllBreakpoints
(
enabled
:
boolean
):
TPromise
<
void
>
;
toggleEnablement
(
element
:
IEnablement
):
TPromise
<
void
>
;
setBreakpointsActivated
(
activated
:
boolean
):
TPromise
<
void
>
;
remove
AllBreakpoints
(
):
TPromise
<
any
>
;
remove
Breakpoints
(
id
?:
string
):
TPromise
<
any
>
;
/**
* Function breakpoints manipulation.
*/
addFunctionBreakpoint
():
void
;
renameFunctionBreakpoint
(
id
:
string
,
newFunctionName
:
string
):
TPromise
<
void
>
;
removeFunctionBreakpoints
(
id
?:
string
):
TPromise
<
void
>
;
/**
* Repl expressions manipulation.
*/
addReplExpression
(
name
:
string
):
TPromise
<
void
>
;
clear
ReplExpressions
():
void
;
remove
ReplExpressions
():
void
;
logToRepl
(
value
:
string
|
{
[
key
:
string
]:
any
},
severity
?:
severity
):
void
;
appendReplOutput
(
value
:
string
,
severity
?:
severity
):
void
;
/**
* Watch expressions manipulation.
*/
addWatchExpression
(
name
?:
string
):
TPromise
<
void
>
;
renameWatchExpression
(
id
:
string
,
newName
:
string
):
TPromise
<
void
>
;
clear
WatchExpressions
(
id
?:
string
):
void
;
remove
WatchExpressions
(
id
?:
string
):
void
;
/**
* Creates a new debug session. Depending on the configuration will either 'launch' or 'attach'.
...
...
src/vs/workbench/parts/debug/common/debugModel.ts
浏览文件 @
7a0b01b2
...
...
@@ -419,7 +419,7 @@ export class Model implements debug.IModel {
return
this
.
_onDidChangeWatchExpressions
.
event
;
}
public
get
onDidChangeR
EPL
Elements
():
Event
<
void
>
{
public
get
onDidChangeR
epl
Elements
():
Event
<
void
>
{
return
this
.
_onDidChangeREPLElements
.
event
;
}
...
...
@@ -633,7 +633,7 @@ export class Model implements debug.IModel {
}
}
public
clear
ReplExpressions
():
void
{
public
remove
ReplExpressions
():
void
{
if
(
this
.
replElements
.
length
>
0
)
{
this
.
replElements
=
[];
this
.
_onDidChangeREPLElements
.
fire
();
...
...
@@ -694,7 +694,7 @@ export class Model implements debug.IModel {
this
.
_onDidChangeWatchExpressions
.
fire
();
}
public
clear
WatchExpressions
(
id
:
string
=
null
):
void
{
public
remove
WatchExpressions
(
id
:
string
=
null
):
void
{
this
.
watchExpressions
=
id
?
this
.
watchExpressions
.
filter
(
we
=>
we
.
getId
()
!==
id
)
:
[];
this
.
_onDidChangeWatchExpressions
.
fire
();
}
...
...
src/vs/workbench/parts/debug/electron-browser/debugActions.ts
浏览文件 @
7a0b01b2
...
...
@@ -285,7 +285,7 @@ export class RemoveAllBreakpointsAction extends AbstractDebugAction {
}
public
run
():
TPromise
<
any
>
{
return
TPromise
.
join
([
this
.
debugService
.
remove
All
Breakpoints
(),
this
.
debugService
.
removeFunctionBreakpoints
()]);
return
TPromise
.
join
([
this
.
debugService
.
removeBreakpoints
(),
this
.
debugService
.
removeFunctionBreakpoints
()]);
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
...
...
@@ -691,7 +691,7 @@ export class RemoveWatchExpressionAction extends AbstractDebugAction {
}
public
run
(
expression
:
model
.
Expression
):
TPromise
<
any
>
{
this
.
debugService
.
clear
WatchExpressions
(
expression
.
getId
());
this
.
debugService
.
remove
WatchExpressions
(
expression
.
getId
());
return
TPromise
.
as
(
null
);
}
}
...
...
@@ -706,7 +706,7 @@ export class RemoveAllWatchExpressionsAction extends AbstractDebugAction {
}
public
run
():
TPromise
<
any
>
{
this
.
debugService
.
clear
WatchExpressions
();
this
.
debugService
.
remove
WatchExpressions
();
return
TPromise
.
as
(
null
);
}
...
...
@@ -728,7 +728,7 @@ export class ClearReplAction extends AbstractDebugAction {
}
public
run
():
TPromise
<
any
>
{
this
.
debugService
.
clear
ReplExpressions
();
this
.
debugService
.
remove
ReplExpressions
();
// focus back to repl
return
this
.
panelService
.
openPanel
(
debug
.
REPL_ID
,
true
);
...
...
@@ -771,7 +771,7 @@ export class ToggleReplAction extends AbstractDebugAction {
}
private
registerListeners
():
void
{
this
.
toDispose
.
push
(
this
.
debugService
.
getModel
().
onDidChangeR
EPL
Elements
(()
=>
{
this
.
toDispose
.
push
(
this
.
debugService
.
getModel
().
onDidChangeR
epl
Elements
(()
=>
{
if
(
!
this
.
isReplVisible
())
{
this
.
class
=
'
debug-action toggle-repl notification
'
;
}
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
7a0b01b2
...
...
@@ -460,9 +460,10 @@ export class DebugService implements debug.IDebugService {
return
this
.
sendExceptionBreakpoints
();
}
public
removeAllBreakpoints
():
TPromise
<
any
>
{
const
urisToClear
=
arrays
.
distinct
(
this
.
model
.
getBreakpoints
(),
bp
=>
bp
.
source
.
uri
.
toString
()).
map
(
bp
=>
bp
.
source
.
uri
);
this
.
model
.
removeBreakpoints
(
this
.
model
.
getBreakpoints
());
public
removeBreakpoints
(
id
?:
string
):
TPromise
<
any
>
{
const
toRemove
=
this
.
model
.
getBreakpoints
().
filter
(
bp
=>
!
id
||
bp
.
getId
()
===
id
);
const
urisToClear
=
arrays
.
distinct
(
toRemove
,
bp
=>
bp
.
source
.
uri
.
toString
()).
map
(
bp
=>
bp
.
source
.
uri
);
this
.
model
.
removeBreakpoints
(
toRemove
);
return
TPromise
.
join
(
urisToClear
.
map
(
uri
=>
this
.
sendBreakpoints
(
uri
)));
}
...
...
@@ -499,8 +500,8 @@ export class DebugService implements debug.IDebugService {
this
.
model
.
appendReplOutput
(
value
,
severity
);
}
public
clear
ReplExpressions
():
void
{
this
.
model
.
clear
ReplExpressions
();
public
remove
ReplExpressions
():
void
{
this
.
model
.
remove
ReplExpressions
();
}
public
addWatchExpression
(
name
:
string
):
TPromise
<
void
>
{
...
...
@@ -511,12 +512,12 @@ export class DebugService implements debug.IDebugService {
return
this
.
model
.
renameWatchExpression
(
this
.
session
,
this
.
viewModel
.
getFocusedStackFrame
(),
id
,
newName
);
}
public
clear
WatchExpressions
(
id
?:
string
):
void
{
this
.
model
.
clear
WatchExpressions
(
id
);
public
remove
WatchExpressions
(
id
?:
string
):
void
{
this
.
model
.
remove
WatchExpressions
(
id
);
}
public
createSession
(
noDebug
:
boolean
,
changeViewState
=
!
this
.
partService
.
isSideBarHidden
()):
TPromise
<
any
>
{
this
.
clear
ReplExpressions
();
this
.
remove
ReplExpressions
();
return
this
.
textFileService
.
saveAll
()
.
then
(()
=>
this
.
extensionService
.
onReady
()
...
...
src/vs/workbench/parts/debug/test/common/debugModel.test.ts
浏览文件 @
7a0b01b2
...
...
@@ -299,7 +299,7 @@ suite('Debug - Model', () => {
model
.
clearWatchExpressionValues
();
assertWatchExpressions
(
model
.
getWatchExpressions
(),
'
new_name
'
);
model
.
clear
WatchExpressions
();
model
.
remove
WatchExpressions
();
assert
.
equal
(
model
.
getWatchExpressions
().
length
,
0
);
});
...
...
@@ -317,7 +317,7 @@ suite('Debug - Model', () => {
assert
.
equal
((
<
debugmodel
.
Expression
>
re
).
reference
,
0
);
});
model
.
clear
ReplExpressions
();
model
.
remove
ReplExpressions
();
assert
.
equal
(
model
.
getReplElements
().
length
,
0
);
});
...
...
@@ -352,7 +352,7 @@ suite('Debug - Model', () => {
assert
.
equal
(
element
.
value
,
'
Object
'
);
assert
.
deepEqual
(
element
.
valueObj
,
keyValueObject
);
model
.
clear
ReplExpressions
();
model
.
remove
ReplExpressions
();
assert
.
equal
(
model
.
getReplElements
().
length
,
0
);
});
...
...
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
浏览文件 @
7a0b01b2
...
...
@@ -55,7 +55,7 @@ export class MockDebugService implements debug.IDebugService {
return
TPromise
.
as
(
null
);
}
public
remove
All
Breakpoints
():
TPromise
<
any
>
{
public
removeBreakpoints
():
TPromise
<
any
>
{
return
TPromise
.
as
(
null
);
}
...
...
@@ -73,7 +73,7 @@ export class MockDebugService implements debug.IDebugService {
return
TPromise
.
as
(
null
);
}
public
clear
ReplExpressions
():
void
{}
public
remove
ReplExpressions
():
void
{}
public
logToRepl
(
value
:
string
,
severity
?:
severity
):
void
;
public
logToRepl
(
value
:
{
[
key
:
string
]:
any
},
severity
?:
severity
):
void
;
...
...
@@ -89,7 +89,7 @@ export class MockDebugService implements debug.IDebugService {
return
TPromise
.
as
(
null
);
}
public
clear
WatchExpressions
(
id
?:
string
):
void
{}
public
remove
WatchExpressions
(
id
?:
string
):
void
{}
public
createSession
(
noDebug
:
boolean
):
TPromise
<
any
>
{
return
TPromise
.
as
(
null
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录