Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
6acf1a2a
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,发现更多精彩内容 >>
提交
6acf1a2a
编写于
5月 02, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: use readonly more
fixes #48064
上级
8745c1f8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
65 addition
and
49 deletion
+65
-49
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+38
-37
src/vs/workbench/parts/debug/common/debugModel.ts
src/vs/workbench/parts/debug/common/debugModel.ts
+15
-10
src/vs/workbench/parts/debug/common/debugViewModel.ts
src/vs/workbench/parts/debug/common/debugViewModel.ts
+11
-1
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+1
-1
未找到文件。
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
6acf1a2a
...
...
@@ -145,7 +145,7 @@ export interface IProcess extends ITreeElement {
readonly
state
:
ProcessState
;
getSourceForUri
(
modelUri
:
uri
):
Source
;
getThread
(
threadId
:
number
):
IThread
;
getAllThreads
():
IThread
[]
;
getAllThreads
():
ReadonlyArray
<
IThread
>
;
getSource
(
raw
:
DebugProtocol
.
Source
):
Source
;
completions
(
frameId
:
number
,
text
:
string
,
position
:
Position
,
overwriteBefore
:
number
):
TPromise
<
ISuggestion
[]
>
;
}
...
...
@@ -225,57 +225,57 @@ export interface IStackFrame extends ITreeElement {
}
export
interface
IEnablement
extends
ITreeElement
{
enabled
:
boolean
;
readonly
enabled
:
boolean
;
}
export
interface
IBreakpointData
{
id
?:
string
;
lineNumber
:
number
;
column
?:
number
;
enabled
?:
boolean
;
condition
?:
string
;
logMessage
?:
string
;
hitCondition
?:
string
;
readonly
id
?:
string
;
readonly
lineNumber
:
number
;
readonly
column
?:
number
;
readonly
enabled
?:
boolean
;
readonly
condition
?:
string
;
readonly
logMessage
?:
string
;
readonly
hitCondition
?:
string
;
}
export
interface
IBreakpointUpdateData
extends
DebugProtocol
.
Breakpoint
{
condition
?:
string
;
hitCondition
?:
string
;
logMessage
?:
string
;
readonly
condition
?:
string
;
readonly
hitCondition
?:
string
;
readonly
logMessage
?:
string
;
}
export
interface
IBaseBreakpoint
extends
IEnablement
{
condition
:
string
;
hitCondition
:
string
;
logMessage
:
string
;
verified
:
boolean
;
idFromAdapter
:
number
;
readonly
condition
:
string
;
readonly
hitCondition
:
string
;
readonly
logMessage
:
string
;
readonly
verified
:
boolean
;
readonly
idFromAdapter
:
number
;
}
export
interface
IBreakpoint
extends
IBaseBreakpoint
{
uri
:
uri
;
lineNumber
:
number
;
endLineNumber
?:
number
;
column
:
number
;
endColumn
?:
number
;
message
:
string
;
adapterData
:
any
;
readonly
uri
:
uri
;
readonly
lineNumber
:
number
;
readonly
endLineNumber
?:
number
;
readonly
column
:
number
;
readonly
endColumn
?:
number
;
readonly
message
:
string
;
readonly
adapterData
:
any
;
}
export
interface
IFunctionBreakpoint
extends
IBaseBreakpoint
{
name
:
string
;
readonly
name
:
string
;
}
export
interface
IExceptionBreakpoint
extends
IEnablement
{
filter
:
string
;
label
:
string
;
readonly
filter
:
string
;
readonly
label
:
string
;
}
export
interface
IExceptionInfo
{
id
?:
string
;
description
?:
string
;
breakMode
:
string
;
details
?:
DebugProtocol
.
ExceptionDetails
;
readonly
id
?:
string
;
readonly
description
?:
string
;
readonly
breakMode
:
string
;
readonly
details
?:
DebugProtocol
.
ExceptionDetails
;
}
// model interfaces
...
...
@@ -284,17 +284,18 @@ export interface IViewModel extends ITreeElement {
/**
* Returns the focused debug process or null if no process is stopped.
*/
focusedProcess
:
IProcess
;
readonly
focusedProcess
:
IProcess
;
/**
* Returns the focused thread or null if no thread is stopped.
*/
focusedThread
:
IThread
;
readonly
focusedThread
:
IThread
;
/**
* Returns the focused stack frame or null if there are no stack frames.
*/
focusedStackFrame
:
IStackFrame
;
readonly
focusedStackFrame
:
IStackFrame
;
getSelectedExpression
():
IExpression
;
getSelectedFunctionBreakpoint
():
IFunctionBreakpoint
;
setSelectedExpression
(
expression
:
IExpression
):
void
;
...
...
@@ -409,8 +410,8 @@ export interface IDebugAdapterProvider extends ITerminalLauncher {
}
export
interface
IAdapterExecutable
{
command
?:
string
;
args
?:
string
[];
readonly
command
?:
string
;
readonly
args
?:
string
[];
}
export
interface
IPlatformSpecificAdapterContribution
{
...
...
@@ -446,7 +447,7 @@ export interface IDebuggerContribution extends IPlatformSpecificAdapterContribut
}
export
interface
IDebugConfigurationProvider
{
type
:
string
;
readonly
type
:
string
;
handle
:
number
;
resolveDebugConfiguration
?(
folderUri
:
uri
|
undefined
,
debugConfiguration
:
IConfig
):
TPromise
<
IConfig
>
;
provideDebugConfigurations
?(
folderUri
:
uri
|
undefined
):
TPromise
<
IConfig
[]
>
;
...
...
src/vs/workbench/parts/debug/common/debugModel.ts
浏览文件 @
6acf1a2a
...
...
@@ -966,6 +966,10 @@ export class Model implements IModel {
this
.
_onDidChangeBreakpoints
.
fire
({
changed
:
updated
});
}
public
unverifyBreakpoints
():
void
{
this
.
breakpoints
.
forEach
(
bp
=>
bp
.
verified
=
false
);
}
private
sortAndDeDup
():
void
{
this
.
breakpoints
=
this
.
breakpoints
.
sort
((
first
,
second
)
=>
{
if
(
first
.
uri
.
toString
()
!==
second
.
uri
.
toString
())
{
...
...
@@ -981,19 +985,20 @@ export class Model implements IModel {
}
public
setEnablement
(
element
:
IEnablement
,
enable
:
boolean
):
void
{
if
(
element
instanceof
Breakpoint
||
element
instanceof
FunctionBreakpoint
||
element
instanceof
ExceptionBreakpoint
)
{
const
changed
:
(
IBreakpoint
|
IFunctionBreakpoint
)[]
=
[];
if
(
element
.
enabled
!==
enable
&&
(
element
instanceof
Breakpoint
||
element
instanceof
FunctionBreakpoint
))
{
changed
.
push
(
element
);
}
const
changed
:
(
IBreakpoint
|
IFunctionBreakpoint
)[]
=
[];
if
(
element
.
enabled
!==
enable
&&
(
element
instanceof
Breakpoint
||
element
instanceof
FunctionBreakpoint
))
{
changed
.
push
(
element
);
}
element
.
enabled
=
enable
;
if
(
element
instanceof
Breakpoint
&&
!
element
.
enabled
)
{
const
breakpoint
=
<
Breakpoint
>
element
;
breakpoint
.
verified
=
false
;
}
element
.
enabled
=
enable
;
if
(
element
instanceof
Breakpoint
&&
!
element
.
enabled
)
{
const
breakpoint
=
<
Breakpoint
>
element
;
breakpoint
.
verified
=
false
;
this
.
_onDidChangeBreakpoints
.
fire
({
changed
:
changed
});
}
this
.
_onDidChangeBreakpoints
.
fire
({
changed
:
changed
});
}
public
enableOrDisableAllBreakpoints
(
enable
:
boolean
):
void
{
...
...
src/vs/workbench/parts/debug/common/debugViewModel.ts
浏览文件 @
6acf1a2a
...
...
@@ -39,7 +39,17 @@ export class ViewModel implements IViewModel {
}
public
get
focusedThread
():
IThread
{
return
this
.
_focusedStackFrame
?
this
.
_focusedStackFrame
.
thread
:
(
this
.
_focusedProcess
?
this
.
_focusedProcess
.
getAllThreads
().
pop
()
:
null
);
if
(
this
.
_focusedStackFrame
)
{
return
this
.
_focusedStackFrame
.
thread
;
}
if
(
this
.
_focusedProcess
)
{
const
threads
=
this
.
_focusedProcess
.
getAllThreads
();
if
(
threads
&&
threads
.
length
)
{
return
threads
[
threads
.
length
-
1
];
}
}
return
undefined
;
}
public
get
focusedStackFrame
():
IStackFrame
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
6acf1a2a
...
...
@@ -696,7 +696,7 @@ export class DebugService implements debug.IDebugService {
if
(
this
.
model
.
getProcesses
().
length
===
0
)
{
this
.
removeReplExpressions
();
this
.
allProcesses
.
clear
();
this
.
model
.
getBreakpoints
().
forEach
(
bp
=>
bp
.
verified
=
false
);
this
.
model
.
unverifyBreakpoints
(
);
}
this
.
launchJsonChanged
=
false
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录