Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
f4dfed42
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,发现更多精彩内容 >>
提交
f4dfed42
编写于
1月 12, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: show warnings in launch.json for relative paths
fixes #1575
上级
48127859
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
19 deletion
+26
-19
src/vs/workbench/parts/debug/browser/replViewer.ts
src/vs/workbench/parts/debug/browser/replViewer.ts
+2
-2
src/vs/workbench/parts/debug/node/debugAdapter.ts
src/vs/workbench/parts/debug/node/debugAdapter.ts
+16
-4
src/vs/workbench/parts/debug/node/debugConfigurationManager.ts
...s/workbench/parts/debug/node/debugConfigurationManager.ts
+8
-13
未找到文件。
src/vs/workbench/parts/debug/browser/replViewer.ts
浏览文件 @
f4dfed42
...
...
@@ -93,7 +93,7 @@ export class ReplExpressionsRenderer implements tree.IRenderer {
private
static
VALUE_OUTPUT_TEMPLATE_ID
=
'
outputValue
'
;
private
static
KEY_VALUE_OUTPUT_TEMPLATE_ID
=
'
outputKeyValue
'
;
private
static
FILE_LOCATION_PATTERNS
:
RegExp
[]
=
[
private
static
FILE_LOCATION_PATTERNS
:
RegExp
[]
=
[
// group 0: the full thing :)
// group 1: absolute path
// group 2: drive letter on windows with trailing backslash or leading slash on mac/linux
...
...
@@ -101,7 +101,7 @@ export class ReplExpressionsRenderer implements tree.IRenderer {
// group 4: column number
// eg: at Context.<anonymous> (c:\Users\someone\Desktop\mocha-runner\test\test.js:26:11)
/
((\/
|
[
a-zA-Z
]
:
\\)[^\(\)
<>
\'\"\[\]]
+
)
:
(\d
+
)
:
(\d
+
)
/
]
]
;
private
width
:
number
;
private
characterWidth
:
number
;
...
...
src/vs/workbench/parts/debug/node/debugAdapter.ts
浏览文件 @
f4dfed42
...
...
@@ -81,23 +81,28 @@ export class Adapter {
if
(
!
attributes
.
properties
)
{
attributes
.
properties
=
{
};
}
attributes
.
properties
.
type
=
{
const
properties
=
attributes
.
properties
;
properties
.
type
=
{
enum
:
[
this
.
type
],
description
:
nls
.
localize
(
'
debugType
'
,
"
Type of configuration.
"
)
};
attributes
.
properties
.
name
=
{
properties
.
name
=
{
type
:
'
string
'
,
description
:
nls
.
localize
(
'
debugName
'
,
"
Name of configuration; appears in the launch configuration drop down menu.
"
),
default
:
'
Launch
'
};
attributes
.
properties
.
request
=
{
properties
.
request
=
{
enum
:
[
request
],
description
:
nls
.
localize
(
'
debugRequest
'
,
"
Request type of configuration. Can be
\"
launch
\"
or
\"
attach
\"
.
"
),
};
attributes
.
properties
.
preLaunchTask
=
{
properties
.
preLaunchTask
=
{
type
:
'
string
'
,
description
:
nls
.
localize
(
'
debugPrelaunchTask
'
,
"
Task to run before debug session starts.
"
)
};
this
.
warnRelativePaths
(
properties
.
outDir
);
this
.
warnRelativePaths
(
properties
.
program
);
this
.
warnRelativePaths
(
properties
.
cwd
);
this
.
warnRelativePaths
(
properties
.
runtimeExecutable
);
return
attributes
;
});
...
...
@@ -105,4 +110,11 @@ export class Adapter {
return
null
;
}
private
warnRelativePaths
(
attribute
:
any
):
void
{
if
(
attribute
)
{
attribute
.
pattern
=
'
^
\\
${.*}.*|^((
\\
/|[a-zA-Z]:
\\\\
)[^
\\
(
\\
)<>
\\\'\\
"
\\
[
\\
]]+)
'
;
attribute
.
errorMessage
=
nls
.
localize
(
'
relativePathsNotConverted
'
,
"
Relative paths will no longer be converted to absolute ones. Consider using ${workspaceRoot} as a prefix.
"
);
}
}
}
src/vs/workbench/parts/debug/node/debugConfigurationManager.ts
浏览文件 @
f4dfed42
...
...
@@ -19,7 +19,6 @@ import jsonContributionRegistry = require('vs/platform/jsonschemas/common/jsonCo
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IMessageService
}
from
'
vs/platform/message/common/message
'
;
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
);
import
{
SystemVariables
}
from
'
vs/workbench/parts/lib/node/systemVariables
'
;
import
{
Adapter
}
from
'
vs/workbench/parts/debug/node/debugAdapter
'
;
...
...
@@ -158,11 +157,10 @@ export class ConfigurationManager {
@
ITelemetryService
private
telemetryService
:
ITelemetryService
,
@
IWorkbenchEditorService
private
editorService
:
IWorkbenchEditorService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
@
IQuickOpenService
private
quickOpenService
:
IQuickOpenService
,
@
IMessageService
private
messageService
:
IMessageService
@
IQuickOpenService
private
quickOpenService
:
IQuickOpenService
)
{
this
.
systemVariables
=
this
.
contextService
.
getWorkspace
()
?
new
SystemVariables
(
this
.
editorService
,
this
.
contextService
)
:
null
;
this
.
setConfiguration
(
configName
,
true
);
this
.
setConfiguration
(
configName
);
this
.
adapters
=
[];
this
.
registerListeners
();
this
.
allModeIdsForBreakpoints
=
{};
...
...
@@ -226,7 +224,7 @@ export class ConfigurationManager {
return
this
.
adapters
.
filter
(
adapter
=>
adapter
.
type
===
this
.
configuration
.
type
).
pop
();
}
public
setConfiguration
(
name
:
string
,
silent
=
false
):
Promise
{
public
setConfiguration
(
name
:
string
):
Promise
{
return
this
.
loadLaunchConfig
().
then
(
config
=>
{
if
(
!
config
||
!
config
.
configurations
)
{
this
.
configuration
=
null
;
...
...
@@ -246,13 +244,13 @@ export class ConfigurationManager {
}
this
.
configuration
.
debugServer
=
config
.
debugServer
;
this
.
configuration
.
outDir
=
this
.
resolvePath
(
this
.
configuration
.
outDir
,
silent
);
this
.
configuration
.
outDir
=
this
.
resolvePath
(
this
.
configuration
.
outDir
);
this
.
configuration
.
address
=
this
.
configuration
.
address
||
'
localhost
'
;
this
.
configuration
.
program
=
this
.
resolvePath
(
this
.
configuration
.
program
,
silent
);
this
.
configuration
.
program
=
this
.
resolvePath
(
this
.
configuration
.
program
);
this
.
configuration
.
stopOnEntry
=
this
.
configuration
.
stopOnEntry
===
undefined
?
false
:
this
.
configuration
.
stopOnEntry
;
this
.
configuration
.
args
=
this
.
configuration
.
args
&&
this
.
configuration
.
args
.
length
>
0
?
this
.
systemVariables
.
resolve
(
this
.
configuration
.
args
)
:
null
;
this
.
configuration
.
cwd
=
this
.
resolvePath
(
this
.
configuration
.
cwd
||
'
.
'
,
true
);
this
.
configuration
.
runtimeExecutable
=
this
.
resolvePath
(
this
.
configuration
.
runtimeExecutable
,
silent
);
this
.
configuration
.
cwd
=
this
.
resolvePath
(
this
.
configuration
.
cwd
||
'
.
'
);
this
.
configuration
.
runtimeExecutable
=
this
.
resolvePath
(
this
.
configuration
.
runtimeExecutable
);
this
.
configuration
.
runtimeArgs
=
this
.
configuration
.
runtimeArgs
&&
this
.
configuration
.
runtimeArgs
.
length
>
0
?
this
.
configuration
.
runtimeArgs
:
null
;
}
});
...
...
@@ -344,16 +342,13 @@ export class ConfigurationManager {
return
!!
this
.
allModeIdsForBreakpoints
[
modeId
];
}
private
resolvePath
(
p
:
string
,
silent
:
boolean
):
string
{
private
resolvePath
(
p
:
string
):
string
{
if
(
!
p
)
{
return
null
;
}
if
(
path
.
isAbsolute
(
p
))
{
return
paths
.
normalize
(
p
,
true
);
}
if
(
!
silent
)
{
this
.
messageService
.
show
(
Severity
.
Warning
,
'
Relative paths in
\'
launch.json
\'
will no longer be supported, use
\'
${workspaceRoot}/
'
+
p
+
'
\'
instead.
'
);
}
return
paths
.
normalize
(
uri
.
file
(
paths
.
join
(
this
.
contextService
.
getWorkspace
().
resource
.
fsPath
,
p
)).
fsPath
,
true
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录