Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
dd56a283
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,发现更多精彩内容 >>
提交
dd56a283
编写于
1月 23, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: schema for compound configurations names
上级
8b3b72d1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
10 deletion
+22
-10
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/debugConfigurationManager.ts
...parts/debug/electron-browser/debugConfigurationManager.ts
+18
-3
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+3
-6
未找到文件。
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
dd56a283
...
...
@@ -460,7 +460,7 @@ export interface ILaunch {
* Returns the names of all configurations and compounds.
* Ignores configurations which are invalid.
*/
getConfigurationNames
():
string
[];
getConfigurationNames
(
includeCompounds
?:
boolean
):
string
[];
/**
* Returns the resolved configuration.
...
...
src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts
浏览文件 @
dd56a283
...
...
@@ -187,7 +187,12 @@ const schema: IJSONSchema = {
type
:
'
array
'
,
default
:
[],
items
:
{
type
:
'
string
'
oneOf
:
[{
enum
:
[],
description
:
nls
.
localize
(
'
useUniqueNames
'
,
"
Please use unique configuration names.
"
)
},
{
type
:
'
object
'
}]
},
description
:
nls
.
localize
(
'
app.launch.json.compounds.configurations
'
,
"
Names of configurations that will be started as part of this compound.
"
)
}
...
...
@@ -311,6 +316,8 @@ export class ConfigurationManager implements IConfigurationManager {
items
.
defaultSnippets
.
push
(...
configurationSnippets
);
}
});
this
.
setCompoundSchemaValues
();
});
breakpointsExtPoint
.
setHandler
(
extensions
=>
{
...
...
@@ -328,6 +335,7 @@ export class ConfigurationManager implements IConfigurationManager {
this
.
toDispose
.
push
(
this
.
configurationService
.
onDidChangeConfiguration
(
e
=>
{
if
(
e
.
affectsConfiguration
(
'
launch
'
))
{
this
.
selectConfiguration
();
this
.
setCompoundSchemaValues
();
}
}));
...
...
@@ -345,6 +353,13 @@ export class ConfigurationManager implements IConfigurationManager {
}
}
private
setCompoundSchemaValues
():
void
{
const
compoundConfigurationsSchema
=
(
<
IJSONSchema
>
schema
.
properties
[
'
compounds
'
].
items
).
properties
[
'
configurations
'
];
(
<
IJSONSchema
>
compoundConfigurationsSchema
.
items
).
oneOf
[
0
].
enum
=
this
.
launches
.
map
(
l
=>
l
.
getConfigurationNames
(
false
)).
reduce
((
first
,
second
)
=>
first
.
concat
(
second
),
[]);
jsonRegistry
.
registerSchema
(
launchSchemaId
,
schema
);
}
public
getLaunches
():
ILaunch
[]
{
return
this
.
launches
;
}
...
...
@@ -495,13 +510,13 @@ class Launch implements ILaunch {
return
config
.
compounds
.
filter
(
compound
=>
compound
.
name
===
name
).
pop
();
}
public
getConfigurationNames
():
string
[]
{
public
getConfigurationNames
(
includeCompounds
=
true
):
string
[]
{
const
config
=
this
.
getConfig
();
if
(
!
config
||
!
config
.
configurations
||
!
Array
.
isArray
(
config
.
configurations
))
{
return
[];
}
else
{
const
names
=
config
.
configurations
.
filter
(
cfg
=>
cfg
&&
typeof
cfg
.
name
===
'
string
'
).
map
(
cfg
=>
cfg
.
name
);
if
(
names
.
length
>
0
&&
config
.
compounds
)
{
if
(
includeCompounds
&&
names
.
length
>
0
&&
config
.
compounds
)
{
if
(
config
.
compounds
)
{
names
.
push
(...
config
.
compounds
.
filter
(
compound
=>
typeof
compound
.
name
===
'
string
'
&&
compound
.
configurations
&&
compound
.
configurations
.
length
)
.
map
(
compound
=>
compound
.
name
));
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
dd56a283
...
...
@@ -699,12 +699,9 @@ export class DebugService implements debug.IDebugService {
}
let
rootForName
=
root
;
if
(
launch
===
this
.
configurationManager
.
getWorkspaceLaunch
())
{
// For workspace launches allow comound referencing configurations across folder
const
launchContainingName
=
this
.
configurationManager
.
getLaunches
().
filter
(
l
=>
!!
l
.
getConfiguration
(
name
)).
pop
();
if
(
launchContainingName
)
{
rootForName
=
launchContainingName
.
workspace
;
}
const
launchesContainingName
=
this
.
configurationManager
.
getLaunches
().
filter
(
l
=>
!!
l
.
getConfiguration
(
name
));
if
(
launchesContainingName
&&
launchesContainingName
.
length
===
1
)
{
rootForName
=
launchesContainingName
[
0
].
workspace
;
}
return
this
.
startDebugging
(
rootForName
,
name
,
noDebug
,
topCompoundName
||
compound
.
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录