Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
efbc898d
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,发现更多精彩内容 >>
提交
efbc898d
编写于
8月 03, 2017
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Debug events: sessionId should live one level up from the body
fixes #31391
上级
064efc97
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
24 addition
and
24 deletion
+24
-24
src/vs/workbench/api/electron-browser/mainThreadDebugService.ts
.../workbench/api/electron-browser/mainThreadDebugService.ts
+3
-3
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+5
-1
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+5
-5
src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts
...workbench/parts/debug/electron-browser/rawDebugSession.ts
+9
-13
src/vs/workbench/parts/debug/test/common/mockDebug.ts
src/vs/workbench/parts/debug/test/common/mockDebug.ts
+2
-2
未找到文件。
src/vs/workbench/api/electron-browser/mainThreadDebugService.ts
浏览文件 @
efbc898d
...
...
@@ -34,9 +34,9 @@ export class MainThreadDebugService extends MainThreadDebugServiceShape {
}
}));
this
.
_toDispose
.
push
(
debugService
.
onDidCustomEvent
(
event
=>
{
if
(
event
.
body
&&
event
.
body
.
sessionId
)
{
const
process
=
this
.
debugService
.
findProcessByUUID
(
event
.
body
.
sessionId
);
// TODO
this
.
_proxy
.
$acceptDebugSessionCustomEvent
(
event
.
body
.
sessionId
,
process
.
configuration
.
type
,
process
.
configuration
.
name
,
event
);
if
(
event
&&
event
.
sessionId
)
{
const
process
=
this
.
debugService
.
findProcessByUUID
(
event
.
sessionId
);
this
.
_proxy
.
$acceptDebugSessionCustomEvent
(
event
.
sessionId
,
process
.
configuration
.
type
,
process
.
configuration
.
name
,
event
);
}
}));
}
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
efbc898d
...
...
@@ -451,6 +451,10 @@ export interface ILaunch {
export
const
IDebugService
=
createDecorator
<
IDebugService
>
(
DEBUG_SERVICE_ID
);
export
interface
DebugEvent
extends
DebugProtocol
.
Event
{
sessionId
?:
string
;
}
export
interface
IDebugService
{
_serviceBrand
:
any
;
...
...
@@ -477,7 +481,7 @@ export interface IDebugService {
/**
* Allows to register on custom DAP events.
*/
onDidCustomEvent
:
Event
<
Debug
Protocol
.
Event
>
;
onDidCustomEvent
:
Event
<
DebugEvent
>
;
/**
* Gets the current configuration manager.
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
efbc898d
...
...
@@ -69,7 +69,7 @@ export class DebugService implements debug.IDebugService {
private
_onDidChangeState
:
Emitter
<
debug
.
State
>
;
private
_onDidNewProcess
:
Emitter
<
debug
.
IProcess
>
;
private
_onDidEndProcess
:
Emitter
<
debug
.
IProcess
>
;
private
_onDidCustomEvent
:
Emitter
<
DebugProtocol
.
Event
>
;
private
_onDidCustomEvent
:
Emitter
<
debug
.
Debug
Event
>
;
private
model
:
Model
;
private
viewModel
:
ViewModel
;
private
allSessionIds
:
Set
<
string
>
;
...
...
@@ -114,7 +114,7 @@ export class DebugService implements debug.IDebugService {
this
.
_onDidChangeState
=
new
Emitter
<
debug
.
State
>
();
this
.
_onDidNewProcess
=
new
Emitter
<
debug
.
IProcess
>
();
this
.
_onDidEndProcess
=
new
Emitter
<
debug
.
IProcess
>
();
this
.
_onDidCustomEvent
=
new
Emitter
<
DebugProtocol
.
Event
>
();
this
.
_onDidCustomEvent
=
new
Emitter
<
debug
.
Debug
Event
>
();
this
.
sessionStates
=
new
Map
<
string
,
debug
.
State
>
();
this
.
allSessionIds
=
new
Set
<
string
>
();
...
...
@@ -346,7 +346,7 @@ export class DebugService implements debug.IDebugService {
this
.
toDisposeOnSessionEnd
.
get
(
session
.
getId
()).
push
(
session
.
onDidTerminateDebugee
(
event
=>
{
aria
.
status
(
nls
.
localize
(
'
debuggingStopped
'
,
"
Debugging stopped.
"
));
if
(
session
&&
session
.
getId
()
===
event
.
body
.
sessionId
)
{
if
(
session
&&
session
.
getId
()
===
event
.
sessionId
)
{
if
(
event
.
body
&&
event
.
body
.
restart
&&
process
)
{
this
.
restartProcess
(
process
,
event
.
body
.
restart
).
done
(
null
,
err
=>
this
.
messageService
.
show
(
severity
.
Error
,
err
.
message
));
}
else
{
...
...
@@ -416,7 +416,7 @@ export class DebugService implements debug.IDebugService {
payload
:
[
process
.
session
.
root
.
fsPath
]
});
}
if
(
session
&&
session
.
getId
()
===
event
.
body
.
sessionId
)
{
if
(
session
&&
session
.
getId
()
===
event
.
sessionId
)
{
this
.
onSessionEnd
(
session
);
}
}));
...
...
@@ -511,7 +511,7 @@ export class DebugService implements debug.IDebugService {
return
this
.
_onDidEndProcess
.
event
;
}
public
get
onDidCustomEvent
():
Event
<
DebugProtocol
.
Event
>
{
public
get
onDidCustomEvent
():
Event
<
debug
.
Debug
Event
>
{
return
this
.
_onDidCustomEvent
.
event
;
}
...
...
src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts
浏览文件 @
efbc898d
...
...
@@ -21,27 +21,27 @@ import { ITerminalService } from 'vs/workbench/parts/terminal/common/terminal';
import
{
ITerminalService
as
IExternalTerminalService
}
from
'
vs/workbench/parts/execution/common/execution
'
;
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
);
import
{
Adapter
}
from
'
vs/workbench/parts/debug/node/debugAdapter
'
;
import
v8
=
require
(
'
vs/workbench/parts/debug/node/v8Protocol
'
)
;
import
{
V8Protocol
}
from
'
vs/workbench/parts/debug/node/v8Protocol
'
;
import
{
IOutputService
}
from
'
vs/workbench/parts/output/common/output
'
;
import
{
ExtensionsChannelId
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
TerminalSupport
}
from
'
vs/workbench/parts/debug/electron-browser/terminalSupport
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
export
interface
SessionExitedEvent
extends
DebugProtocol
.
Exited
Event
{
export
interface
SessionExitedEvent
extends
debug
.
Debug
Event
{
body
:
{
exitCode
:
number
,
sessionId
:
string
};
}
export
interface
SessionTerminatedEvent
extends
DebugProtocol
.
Terminated
Event
{
export
interface
SessionTerminatedEvent
extends
debug
.
Debug
Event
{
body
:
{
restart
?:
boolean
,
sessionId
:
string
};
}
export
class
RawDebugSession
extends
v8
.
V8Protocol
implements
debug
.
ISession
{
export
class
RawDebugSession
extends
V8Protocol
implements
debug
.
ISession
{
public
emittedStopped
:
boolean
;
public
readyForBreakpoints
:
boolean
;
...
...
@@ -63,7 +63,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession {
private
_onDidThread
:
Emitter
<
DebugProtocol
.
ThreadEvent
>
;
private
_onDidOutput
:
Emitter
<
DebugProtocol
.
OutputEvent
>
;
private
_onDidBreakpoint
:
Emitter
<
DebugProtocol
.
BreakpointEvent
>
;
private
_onDidCustomEvent
:
Emitter
<
DebugProtocol
.
Event
>
;
private
_onDidCustomEvent
:
Emitter
<
debug
.
Debug
Event
>
;
private
_onDidEvent
:
Emitter
<
DebugProtocol
.
Event
>
;
constructor
(
...
...
@@ -93,7 +93,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession {
this
.
_onDidThread
=
new
Emitter
<
DebugProtocol
.
ThreadEvent
>
();
this
.
_onDidOutput
=
new
Emitter
<
DebugProtocol
.
OutputEvent
>
();
this
.
_onDidBreakpoint
=
new
Emitter
<
DebugProtocol
.
BreakpointEvent
>
();
this
.
_onDidCustomEvent
=
new
Emitter
<
DebugProtocol
.
Event
>
();
this
.
_onDidCustomEvent
=
new
Emitter
<
debug
.
Debug
Event
>
();
this
.
_onDidEvent
=
new
Emitter
<
DebugProtocol
.
Event
>
();
}
...
...
@@ -129,7 +129,7 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession {
return
this
.
_onDidBreakpoint
.
event
;
}
public
get
onDidCustomEvent
():
Event
<
DebugProtocol
.
Event
>
{
public
get
onDidCustomEvent
():
Event
<
debug
.
Debug
Event
>
{
return
this
.
_onDidCustomEvent
.
event
;
}
...
...
@@ -191,12 +191,8 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession {
});
}
protected
onEvent
(
event
:
DebugProtocol
.
Event
):
void
{
if
(
event
.
body
)
{
event
.
body
.
sessionId
=
this
.
getId
();
}
else
{
event
.
body
=
{
sessionId
:
this
.
getId
()
};
}
protected
onEvent
(
event
:
debug
.
DebugEvent
):
void
{
event
.
sessionId
=
this
.
getId
();
if
(
event
.
event
===
'
initialized
'
)
{
this
.
readyForBreakpoints
=
true
;
...
...
src/vs/workbench/parts/debug/test/common/mockDebug.ts
浏览文件 @
efbc898d
...
...
@@ -15,7 +15,7 @@ export class MockDebugService implements debug.IDebugService {
return
null
;
}
public
get
onDidCustomEvent
():
Event
<
DebugProtocol
.
Event
>
{
public
get
onDidCustomEvent
():
Event
<
debug
.
Debug
Event
>
{
return
null
;
}
...
...
@@ -172,7 +172,7 @@ export class MockSession implements debug.ISession {
return
{};
}
public
get
onDidEvent
():
Event
<
DebugProtocol
.
Event
>
{
public
get
onDidEvent
():
Event
<
debug
.
Debug
Event
>
{
return
null
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录