Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
0913b0c9
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,发现更多精彩内容 >>
提交
0913b0c9
编写于
5月 02, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Distinguish DA exit events from debugee exit events
fixes #48805
上级
505c9392
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
17 deletion
+20
-17
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+1
-1
src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts
...workbench/parts/debug/electron-browser/rawDebugSession.ts
+17
-14
src/vs/workbench/parts/debug/test/common/mockDebug.ts
src/vs/workbench/parts/debug/test/common/mockDebug.ts
+2
-2
未找到文件。
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
0913b0c9
...
...
@@ -115,7 +115,7 @@ export interface ISession {
custom
(
request
:
string
,
args
:
any
):
TPromise
<
DebugProtocol
.
Response
>
;
onDidEvent
:
Event
<
DebugProtocol
.
Event
>
;
onDidInitialize
:
Event
<
DebugProtocol
.
InitializedEvent
>
;
onDidExitAdapter
:
Event
<
DebugEvent
>
;
onDidExitAdapter
:
Event
<
{
sessionId
:
string
}
>
;
restartFrame
(
args
:
DebugProtocol
.
RestartFrameArguments
,
threadId
:
number
):
TPromise
<
DebugProtocol
.
RestartFrameResponse
>
;
next
(
args
:
DebugProtocol
.
NextArguments
):
TPromise
<
DebugProtocol
.
NextResponse
>
;
...
...
src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts
浏览文件 @
0913b0c9
...
...
@@ -70,8 +70,6 @@ export class RawDebugSession implements debug.ISession {
public
emittedStopped
:
boolean
;
public
readyForBreakpoints
:
boolean
;
//private serverProcess: cp.ChildProcess;
//private socket: net.Socket = null;
private
cachedInitServerP
:
TPromise
<
void
>
;
private
startTime
:
number
;
public
disconnected
:
boolean
;
...
...
@@ -83,7 +81,8 @@ export class RawDebugSession implements debug.ISession {
private
readonly
_onDidStop
:
Emitter
<
DebugProtocol
.
StoppedEvent
>
;
private
readonly
_onDidContinued
:
Emitter
<
DebugProtocol
.
ContinuedEvent
>
;
private
readonly
_onDidTerminateDebugee
:
Emitter
<
SessionTerminatedEvent
>
;
private
readonly
_onDidExitAdapter
:
Emitter
<
SessionExitedEvent
>
;
private
readonly
_onDidExitDebugee
:
Emitter
<
DebugProtocol
.
ExitedEvent
>
;
private
readonly
_onDidExitAdapter
:
Emitter
<
{
sessionId
:
string
}
>
;
private
readonly
_onDidThread
:
Emitter
<
DebugProtocol
.
ThreadEvent
>
;
private
readonly
_onDidOutput
:
Emitter
<
DebugProtocol
.
OutputEvent
>
;
private
readonly
_onDidBreakpoint
:
Emitter
<
DebugProtocol
.
BreakpointEvent
>
;
...
...
@@ -109,7 +108,8 @@ export class RawDebugSession implements debug.ISession {
this
.
_onDidStop
=
new
Emitter
<
DebugProtocol
.
StoppedEvent
>
();
this
.
_onDidContinued
=
new
Emitter
<
DebugProtocol
.
ContinuedEvent
>
();
this
.
_onDidTerminateDebugee
=
new
Emitter
<
SessionTerminatedEvent
>
();
this
.
_onDidExitAdapter
=
new
Emitter
<
SessionExitedEvent
>
();
this
.
_onDidExitDebugee
=
new
Emitter
<
DebugProtocol
.
ExitedEvent
>
();
this
.
_onDidExitAdapter
=
new
Emitter
<
{
sessionId
:
string
}
>
();
this
.
_onDidThread
=
new
Emitter
<
DebugProtocol
.
ThreadEvent
>
();
this
.
_onDidOutput
=
new
Emitter
<
DebugProtocol
.
OutputEvent
>
();
this
.
_onDidBreakpoint
=
new
Emitter
<
DebugProtocol
.
BreakpointEvent
>
();
...
...
@@ -137,7 +137,11 @@ export class RawDebugSession implements debug.ISession {
return
this
.
_onDidTerminateDebugee
.
event
;
}
public
get
onDidExitAdapter
():
Event
<
SessionExitedEvent
>
{
public
get
onDidExitDebugee
():
Event
<
DebugProtocol
.
ExitedEvent
>
{
return
this
.
_onDidExitDebugee
.
event
;
}
public
get
onDidExitAdapter
():
Event
<
{
sessionId
:
string
}
>
{
return
this
.
_onDidExitAdapter
.
event
;
}
...
...
@@ -189,10 +193,10 @@ export class RawDebugSession implements debug.ISession {
this
.
debugAdapter
=
debugAdapter
;
this
.
debugAdapter
.
onError
(
err
=>
this
.
onD
apServ
erError
(
err
));
this
.
debugAdapter
.
onError
(
err
=>
this
.
onD
ebugAdapt
erError
(
err
));
this
.
debugAdapter
.
onEvent
(
event
=>
this
.
onDapEvent
(
event
));
this
.
debugAdapter
.
onRequest
(
request
=>
this
.
dispatchRequest
(
request
));
this
.
debugAdapter
.
onExit
(
code
=>
this
.
on
Serv
erExit
());
this
.
debugAdapter
.
onExit
(
code
=>
this
.
on
DebugAdapt
erExit
());
return
this
.
debugAdapter
.
startSession
();
});
...
...
@@ -283,7 +287,7 @@ export class RawDebugSession implements debug.ISession {
}
else
if
(
event
.
event
===
'
terminated
'
)
{
this
.
_onDidTerminateDebugee
.
fire
(
<
SessionTerminatedEvent
>
event
);
}
else
if
(
event
.
event
===
'
exit
'
)
{
this
.
_onDidExit
Adapter
.
fire
(
<
SessionExitedEvent
>
event
);
this
.
_onDidExit
Debugee
.
fire
(
<
SessionExitedEvent
>
event
);
}
else
{
this
.
_onDidCustomEvent
.
fire
(
event
);
}
...
...
@@ -517,8 +521,8 @@ export class RawDebugSession implements debug.ISession {
this
.
cachedInitServerP
=
null
;
}
this
.
onDapEvent
({
event
:
'
exit
'
,
type
:
'
event
'
,
seq
:
0
});
if
(
/* !this.serverProcess */
this
.
debugAdapter
instanceof
SocketDebugAdapter
)
{
this
.
_onDidExitAdapter
.
fire
({
sessionId
:
this
.
getId
()
});
if
(
this
.
debugAdapter
instanceof
SocketDebugAdapter
)
{
return
TPromise
.
as
(
null
);
}
...
...
@@ -527,19 +531,18 @@ export class RawDebugSession implements debug.ISession {
return
this
.
debugAdapter
.
stopSession
();
}
private
onD
apServ
erError
(
err
:
Error
):
void
{
private
onD
ebugAdapt
erError
(
err
:
Error
):
void
{
this
.
notificationService
.
error
(
err
.
message
||
err
.
toString
());
this
.
stopServer
().
done
(
null
,
errors
.
onUnexpectedError
);
}
private
onServerExit
():
void
{
//this.serverProcess = null;
private
onDebugAdapterExit
():
void
{
this
.
debugAdapter
=
null
;
this
.
cachedInitServerP
=
null
;
if
(
!
this
.
disconnected
)
{
this
.
notificationService
.
error
(
nls
.
localize
(
'
debugAdapterCrash
'
,
"
Debug adapter process has terminated unexpectedly
"
));
}
this
.
onDapEvent
({
event
:
'
exit
'
,
type
:
'
event
'
,
seq
:
0
});
this
.
_onDidExitAdapter
.
fire
({
sessionId
:
this
.
getId
()
});
}
public
dispose
():
void
{
...
...
src/vs/workbench/parts/debug/test/common/mockDebug.ts
浏览文件 @
0913b0c9
...
...
@@ -176,8 +176,8 @@ export class MockSession implements ISession {
return
emitter
.
event
;
}
public
get
onDidExitAdapter
():
Event
<
DebugEvent
>
{
const
emitter
=
new
Emitter
<
DebugEvent
>
();
public
get
onDidExitAdapter
():
Event
<
{
sessionId
:
string
}
>
{
const
emitter
=
new
Emitter
<
{
sessionId
:
string
}
>
();
return
emitter
.
event
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录