Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
06fc2f75
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,发现更多精彩内容 >>
提交
06fc2f75
编写于
10月 20, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug service: fully remove the reference to active session
上级
e40ef831
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
13 deletion
+15
-13
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+1
-0
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+14
-13
未找到文件。
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
06fc2f75
...
...
@@ -86,6 +86,7 @@ export interface ISession {
completions
(
args
:
DebugProtocol
.
CompletionsArguments
):
TPromise
<
DebugProtocol
.
CompletionsResponse
>
;
setVariable
(
args
:
DebugProtocol
.
SetVariableArguments
):
TPromise
<
DebugProtocol
.
SetVariableResponse
>
;
source
(
args
:
DebugProtocol
.
SourceArguments
):
TPromise
<
DebugProtocol
.
SourceResponse
>
;
}
export
interface
IProcess
extends
ITreeElement
{
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
06fc2f75
...
...
@@ -141,26 +141,26 @@ export class DebugService implements debug.IDebugService {
this
.
toDispose
.
push
(
this
.
windowService
.
onBroadcast
(
this
.
onBroadcast
,
this
));
}
private
get
session
():
RawDebugSession
{
return
this
.
viewModel
.
focusedProcess
?
<
RawDebugSession
>
(
<
model
.
Process
>
this
.
viewModel
.
focusedProcess
).
session
:
null
;
}
private
onBroadcast
(
broadcast
:
IBroadcast
):
void
{
// attach: PH is ready to be attached to
// TODO@Isidor this is a hack to just get any 'extensionHost' session.
// Optimally the broadcast would contain the id of the session
// We are only intersted if we have an active debug session for extensionHost
const
session
=
<
RawDebugSession
>
this
.
model
.
getProcesses
().
map
(
p
=>
p
.
session
).
filter
(
s
=>
s
.
configuration
.
type
===
'
extensionHost
'
).
pop
();
if
(
broadcast
.
channel
===
EXTENSION_ATTACH_BROADCAST_CHANNEL
)
{
this
.
rawAttach
(
broadcast
.
payload
.
port
);
this
.
rawAttach
(
session
,
broadcast
.
payload
.
port
);
return
;
}
if
(
broadcast
.
channel
===
EXTENSION_TERMINATE_BROADCAST_CHANNEL
)
{
this
.
onSessionEnd
(
this
.
session
);
this
.
onSessionEnd
(
session
);
return
;
}
// from this point on we require an active session
if
(
!
this
.
session
||
this
.
session
.
configuration
.
type
!==
'
extensionHost
'
)
{
return
;
// we are only intersted if we have an active debug session for extensionHost
if
(
!
session
)
{
return
;
}
// a plugin logged output, show it inside the REPL
...
...
@@ -720,9 +720,9 @@ export class DebugService implements debug.IDebugService {
});
}
private
rawAttach
(
port
:
number
):
TPromise
<
any
>
{
if
(
this
.
session
)
{
return
this
.
session
.
attach
({
port
});
private
rawAttach
(
session
:
RawDebugSession
,
port
:
number
):
TPromise
<
any
>
{
if
(
session
)
{
return
session
.
attach
({
port
});
}
this
.
setStateAndEmit
(
debug
.
State
.
Initializing
);
...
...
@@ -818,8 +818,9 @@ export class DebugService implements debug.IDebugService {
if
(
source
.
inMemory
)
{
// internal module
if
(
source
.
reference
!==
0
&&
this
.
session
&&
source
.
available
)
{
return
this
.
session
.
source
({
sourceReference
:
source
.
reference
}).
then
(
response
=>
{
const
process
=
this
.
viewModel
.
focusedProcess
;
if
(
source
.
reference
!==
0
&&
process
&&
source
.
available
)
{
return
process
.
session
.
source
({
sourceReference
:
source
.
reference
}).
then
(
response
=>
{
const
mime
=
response
&&
response
.
body
&&
response
.
body
.
mimeType
?
response
.
body
.
mimeType
:
guessMimeTypes
(
source
.
name
)[
0
];
const
inputValue
=
response
&&
response
.
body
?
response
.
body
.
content
:
''
;
return
this
.
getDebugStringEditorInput
(
source
,
inputValue
,
mime
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录