Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
31d1b50c
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
31d1b50c
编写于
7月 17, 2019
作者:
A
Andre Weinand
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
extensionHostDebugService for web
上级
7d58f5f9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
132 addition
and
10 deletion
+132
-10
src/vs/workbench/browser/web.simpleservices.ts
src/vs/workbench/browser/web.simpleservices.ts
+102
-10
src/vs/workbench/services/environment/browser/environmentService.ts
...kbench/services/environment/browser/environmentService.ts
+30
-0
未找到文件。
src/vs/workbench/browser/web.simpleservices.ts
浏览文件 @
31d1b50c
...
...
@@ -40,6 +40,10 @@ import { IProcessEnvironment } from 'vs/base/common/platform';
import
{
toStoreData
,
restoreRecentlyOpened
}
from
'
vs/platform/history/common/historyStorage
'
;
// tslint:disable-next-line: import-patterns
import
{
IExperimentService
,
IExperiment
,
ExperimentActionType
,
ExperimentState
}
from
'
vs/workbench/contrib/experiments/common/experimentService
'
;
//import { IServerChannel } from 'vs/base/parts/ipc/common/ipc';
import
{
IRemoteAgentService
}
from
'
vs/workbench/services/remote/common/remoteAgentService
'
;
import
{
IChannel
}
from
'
vs/base/parts/ipc/common/ipc
'
;
//import { RemoteAgentConnectionContext } from 'vs/platform/remote/common/remoteAgentEnvironment';
//#region Download
...
...
@@ -649,20 +653,61 @@ registerSingleton(IWindowService, SimpleWindowService);
export
class
SimpleExtensionHostDebugService
implements
IExtensionHostDebugService
{
_serviceBrand
:
any
;
reload
(
sessionId
:
string
):
void
{
}
onReload
:
Event
<
IReloadSessionEvent
>
=
Event
.
None
;
private
channel
:
IChannel
;
close
(
sessionId
:
string
):
void
{
}
onClose
:
Event
<
ICloseSessionEvent
>
=
Event
.
None
;
constructor
(
@
IRemoteAgentService
private
remoteAgentService
:
IRemoteAgentService
)
{
const
connection
=
this
.
remoteAgentService
.
getConnection
();
if
(
connection
)
{
this
.
channel
=
connection
.
getChannel
(
'
extensionhostdebugservice
'
);
}
}
attachSession
(
sessionId
:
string
,
port
:
number
,
subId
?:
string
):
void
{
}
onAttachSession
:
Event
<
IAttachSessionEvent
>
=
Event
.
None
;
reload
(
sessionId
:
string
):
void
{
if
(
this
.
channel
)
{
this
.
channel
.
call
(
'
reload
'
,
[
sessionId
]);
}
}
get
onReload
():
Event
<
IReloadSessionEvent
>
{
return
this
.
channel
?
this
.
channel
.
listen
(
'
reload
'
)
:
Event
.
None
;
}
logToSession
(
sessionId
:
string
,
log
:
IRemoteConsoleLog
):
void
{
}
onLogToSession
:
Event
<
ILogToSessionEvent
>
=
Event
.
None
;
close
(
sessionId
:
string
):
void
{
if
(
this
.
channel
)
{
this
.
channel
.
call
(
'
close
'
,
[
sessionId
]);
}
}
get
onClose
():
Event
<
ICloseSessionEvent
>
{
return
this
.
channel
?
this
.
channel
.
listen
(
'
close
'
)
:
Event
.
None
;
}
terminateSession
(
sessionId
:
string
,
subId
?:
string
):
void
{
}
onTerminateSession
:
Event
<
ITerminateSessionEvent
>
=
Event
.
None
;
attachSession
(
sessionId
:
string
,
port
:
number
,
subId
?:
string
):
void
{
if
(
this
.
channel
)
{
this
.
channel
.
call
(
'
attach
'
,
[
sessionId
,
port
,
subId
]);
}
}
get
onAttachSession
():
Event
<
IAttachSessionEvent
>
{
return
this
.
channel
?
this
.
channel
.
listen
(
'
attach
'
)
:
Event
.
None
;
}
logToSession
(
sessionId
:
string
,
log
:
IRemoteConsoleLog
):
void
{
if
(
this
.
channel
)
{
this
.
channel
.
call
(
'
log
'
,
[
sessionId
,
log
]);
}
}
get
onLogToSession
():
Event
<
ILogToSessionEvent
>
{
return
this
.
channel
?
this
.
channel
.
listen
(
'
log
'
)
:
Event
.
None
;
}
terminateSession
(
sessionId
:
string
,
subId
?:
string
):
void
{
if
(
this
.
channel
)
{
this
.
channel
.
call
(
'
terminate
'
,
[
sessionId
,
subId
]);
}
}
get
onTerminateSession
():
Event
<
ITerminateSessionEvent
>
{
return
this
.
channel
?
this
.
channel
.
listen
(
'
terminate
'
)
:
Event
.
None
;
}
}
registerSingleton
(
IExtensionHostDebugService
,
SimpleExtensionHostDebugService
);
...
...
@@ -807,6 +852,53 @@ export class SimpleWindowsService implements IWindowsService {
}
openExtensionDevelopmentHostWindow
(
args
:
ParsedArgs
,
env
:
IProcessEnvironment
):
Promise
<
void
>
{
// we pass the "ParsedArgs" as query parameters of the URL
let
newAddress
=
`
${
document
.
location
.
origin
}
/?`
;
const
f
=
args
[
'
folder-uri
'
];
if
(
f
)
{
let
u
:
URI
|
undefined
;
if
(
Array
.
isArray
(
f
))
{
if
(
f
.
length
>
0
)
{
u
=
URI
.
parse
(
f
[
0
]);
}
}
else
{
u
=
URI
.
parse
(
f
);
}
if
(
u
)
{
newAddress
+=
`folder=
${
encodeURIComponent
(
u
.
path
)}
`
;
}
}
const
ep
=
args
[
'
extensionDevelopmentPath
'
];
if
(
ep
)
{
let
u
:
string
|
undefined
;
if
(
Array
.
isArray
(
ep
))
{
if
(
ep
.
length
>
0
)
{
u
=
ep
[
0
];
}
}
else
{
u
=
ep
;
}
if
(
u
)
{
newAddress
+=
`&edp=
${
encodeURIComponent
(
u
)}
`
;
}
}
const
di
=
args
[
'
debugId
'
];
if
(
di
)
{
newAddress
+=
`&di=
${
encodeURIComponent
(
di
)}
`
;
}
const
ibe
=
args
[
'
inspect-brk-extensions
'
];
if
(
ibe
)
{
newAddress
+=
`&ibe=
${
encodeURIComponent
(
ibe
)}
`
;
}
window
.
open
(
newAddress
);
return
Promise
.
resolve
();
}
...
...
src/vs/workbench/services/environment/browser/environmentService.ts
浏览文件 @
31d1b50c
...
...
@@ -91,6 +91,36 @@ export class BrowserWorkbenchEnvironmentService implements IEnvironmentService {
this
.
webviewEndpoint
=
configuration
.
webviewEndpoint
;
this
.
untitledWorkspacesHome
=
URI
.
from
({
scheme
:
Schemas
.
untitled
,
path
:
'
Workspaces
'
});
if
(
document
&&
document
.
location
&&
document
.
location
.
search
)
{
const
map
=
new
Map
<
string
,
string
>
();
const
query
=
document
.
location
.
search
.
substring
(
1
);
const
vars
=
query
.
split
(
'
&
'
);
for
(
let
p
of
vars
)
{
const
pair
=
p
.
split
(
'
=
'
);
if
(
pair
.
length
>=
2
)
{
map
.
set
(
decodeURIComponent
(
pair
[
0
]),
decodeURIComponent
(
pair
[
1
]));
}
}
const
edp
=
map
.
get
(
'
edp
'
);
if
(
edp
)
{
this
.
extensionDevelopmentLocationURI
=
[
URI
.
parse
(
edp
)];
this
.
isExtensionDevelopment
=
true
;
}
const
di
=
map
.
get
(
'
di
'
);
if
(
di
)
{
this
.
debugExtensionHost
.
debugId
=
di
;
}
const
ibe
=
map
.
get
(
'
ibe
'
);
if
(
ibe
)
{
this
.
debugExtensionHost
.
port
=
parseInt
(
ibe
);
this
.
debugExtensionHost
.
break
=
false
;
}
}
}
untitledWorkspacesHome
:
URI
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录