Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
3fc422cd
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
3fc422cd
编写于
8月 19, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
simplify extension host debug env
上级
ad2b8bcf
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
11 deletion
+7
-11
src/vs/platform/environment/common/environment.ts
src/vs/platform/environment/common/environment.ts
+1
-2
src/vs/platform/environment/node/environmentService.ts
src/vs/platform/environment/node/environmentService.ts
+3
-6
src/vs/workbench/services/thread/electron-browser/threadService.ts
...rkbench/services/thread/electron-browser/threadService.ts
+3
-3
未找到文件。
src/vs/platform/environment/common/environment.ts
浏览文件 @
3fc422cd
...
@@ -25,8 +25,7 @@ export interface IEnvironmentService {
...
@@ -25,8 +25,7 @@ export interface IEnvironmentService {
extensionDevelopmentPath
:
string
;
extensionDevelopmentPath
:
string
;
extensionTestsPath
:
string
;
extensionTestsPath
:
string
;
debugExtensionHostPort
:
number
;
debugExtensionHost
:
{
port
:
number
;
break
:
boolean
;
};
debugBrkExtensionHost
:
boolean
;
logExtensionHostCommunication
:
boolean
;
logExtensionHostCommunication
:
boolean
;
...
...
src/vs/platform/environment/node/environmentService.ts
浏览文件 @
3fc422cd
...
@@ -24,7 +24,6 @@ export class EnvironmentService implements IEnvironmentService {
...
@@ -24,7 +24,6 @@ export class EnvironmentService implements IEnvironmentService {
@
memoize
@
memoize
get
appRoot
():
string
{
return
path
.
dirname
(
URI
.
parse
(
require
.
toUrl
(
''
)).
fsPath
);
}
get
appRoot
():
string
{
return
path
.
dirname
(
URI
.
parse
(
require
.
toUrl
(
''
)).
fsPath
);
}
get
execPath
():
string
{
return
this
.
args
.
execPath
;
}
get
execPath
():
string
{
return
this
.
args
.
execPath
;
}
@
memoize
@
memoize
...
@@ -51,10 +50,8 @@ export class EnvironmentService implements IEnvironmentService {
...
@@ -51,10 +50,8 @@ export class EnvironmentService implements IEnvironmentService {
get
disableExtensions
():
boolean
{
return
this
.
args
[
'
disable-extensions
'
];
}
get
disableExtensions
():
boolean
{
return
this
.
args
[
'
disable-extensions
'
];
}
@
memoize
@
memoize
private
get
parsedDebugExtensionHost
():
{
port
:
number
;
br
k
:
boolean
;
}
{
return
parseExtensionHostPort
(
this
.
args
,
this
.
isBuilt
);
}
get
debugExtensionHost
():
{
port
:
number
;
brea
k
:
boolean
;
}
{
return
parseExtensionHostPort
(
this
.
args
,
this
.
isBuilt
);
}
get
debugExtensionHostPort
():
number
{
return
this
.
parsedDebugExtensionHost
.
port
;
}
get
debugBrkExtensionHost
():
boolean
{
return
this
.
parsedDebugExtensionHost
.
brk
;
}
get
isBuilt
():
boolean
{
return
!
process
.
env
[
'
VSCODE_DEV
'
];
}
get
isBuilt
():
boolean
{
return
!
process
.
env
[
'
VSCODE_DEV
'
];
}
get
verbose
():
boolean
{
return
this
.
args
.
verbose
;
}
get
verbose
():
boolean
{
return
this
.
args
.
verbose
;
}
get
performance
():
boolean
{
return
this
.
args
.
performance
;
}
get
performance
():
boolean
{
return
this
.
args
.
performance
;
}
...
@@ -63,9 +60,9 @@ export class EnvironmentService implements IEnvironmentService {
...
@@ -63,9 +60,9 @@ export class EnvironmentService implements IEnvironmentService {
constructor
(
private
args
:
IEnvironment
)
{}
constructor
(
private
args
:
IEnvironment
)
{}
}
}
export
function
parseExtensionHostPort
(
args
:
ParsedArgs
,
isBuild
:
boolean
):
{
port
:
number
;
brk
:
boolean
;
}
{
export
function
parseExtensionHostPort
(
args
:
ParsedArgs
,
isBuild
:
boolean
):
{
port
:
number
;
br
ea
k
:
boolean
;
}
{
const
portStr
=
args
.
debugBrkPluginHost
||
args
.
debugPluginHost
;
const
portStr
=
args
.
debugBrkPluginHost
||
args
.
debugPluginHost
;
const
port
=
Number
(
portStr
)
||
(
!
isBuild
?
5870
:
null
);
const
port
=
Number
(
portStr
)
||
(
!
isBuild
?
5870
:
null
);
const
brk
=
port
?
Boolean
(
!!
args
.
debugBrkPluginHost
)
:
false
;
const
brk
=
port
?
Boolean
(
!!
args
.
debugBrkPluginHost
)
:
false
;
return
{
port
,
brk
};
return
{
port
,
br
eak
:
br
k
};
}
}
\ No newline at end of file
src/vs/workbench/services/thread/electron-browser/threadService.ts
浏览文件 @
3fc422cd
...
@@ -113,8 +113,8 @@ class ExtensionHostProcessManager {
...
@@ -113,8 +113,8 @@ class ExtensionHostProcessManager {
// handle extension host lifecycle a bit special when we know we are developing an extension that runs inside
// handle extension host lifecycle a bit special when we know we are developing an extension that runs inside
this
.
isExtensionDevelopmentHost
=
!!
environmentService
.
extensionDevelopmentPath
;
this
.
isExtensionDevelopmentHost
=
!!
environmentService
.
extensionDevelopmentPath
;
this
.
isExtensionDevelopmentDebugging
=
!!
environmentService
.
debug
BrkExtensionHost
;
this
.
isExtensionDevelopmentDebugging
=
!!
environmentService
.
debug
ExtensionHost
.
break
;
this
.
isExtensionDevelopmentTestFromCli
=
this
.
isExtensionDevelopmentHost
&&
!!
environmentService
.
extensionTestsPath
&&
!
environmentService
.
debug
BrkExtensionHost
;
this
.
isExtensionDevelopmentTestFromCli
=
this
.
isExtensionDevelopmentHost
&&
!!
environmentService
.
extensionTestsPath
&&
!
environmentService
.
debug
ExtensionHost
.
break
;
this
.
unsentMessages
=
[];
this
.
unsentMessages
=
[];
this
.
extensionHostProcessReady
=
false
;
this
.
extensionHostProcessReady
=
false
;
...
@@ -139,7 +139,7 @@ class ExtensionHostProcessManager {
...
@@ -139,7 +139,7 @@ class ExtensionHostProcessManager {
this
.
initializeExtensionHostProcess
=
new
TPromise
<
ChildProcess
>
((
c
,
e
)
=>
{
this
.
initializeExtensionHostProcess
=
new
TPromise
<
ChildProcess
>
((
c
,
e
)
=>
{
// Resolve additional execution args (e.g. debug)
// Resolve additional execution args (e.g. debug)
return
this
.
resolveDebugPort
(
this
.
environmentService
.
debugExtensionHost
P
ort
,
port
=>
{
return
this
.
resolveDebugPort
(
this
.
environmentService
.
debugExtensionHost
.
p
ort
,
port
=>
{
if
(
port
)
{
if
(
port
)
{
opts
.
execArgv
=
[
'
--nolazy
'
,
(
this
.
isExtensionDevelopmentDebugging
?
'
--debug-brk=
'
:
'
--debug=
'
)
+
port
];
opts
.
execArgv
=
[
'
--nolazy
'
,
(
this
.
isExtensionDevelopmentDebugging
?
'
--debug-brk=
'
:
'
--debug=
'
)
+
port
];
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录