Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
55643dd7
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,发现更多精彩内容 >>
提交
55643dd7
编写于
10月 13, 2017
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: make createProcess private and remove startDebugSession from exHostDebugService
fixes #36132
上级
0cd0f70b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
2 addition
and
41 deletion
+2
-41
src/vs/workbench/api/electron-browser/mainThreadDebugService.ts
.../workbench/api/electron-browser/mainThreadDebugService.ts
+0
-16
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+0
-1
src/vs/workbench/api/node/extHostDebugService.ts
src/vs/workbench/api/node/extHostDebugService.ts
+0
-8
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+0
-5
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+2
-7
src/vs/workbench/parts/debug/test/common/mockDebug.ts
src/vs/workbench/parts/debug/test/common/mockDebug.ts
+0
-4
未找到文件。
src/vs/workbench/api/electron-browser/mainThreadDebugService.ts
浏览文件 @
55643dd7
...
...
@@ -80,22 +80,6 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape {
});
}
public
$startDebugSession
(
folderUri
:
uri
|
undefined
,
configuration
:
IConfig
):
TPromise
<
DebugSessionUUID
>
{
if
(
configuration
.
request
!==
'
launch
'
&&
configuration
.
request
!==
'
attach
'
)
{
return
TPromise
.
wrapError
(
new
Error
(
`only 'launch' or 'attach' allowed for 'request' attribute`
));
}
const
folder
=
folderUri
?
this
.
contextService
.
getWorkspace
().
folders
.
filter
(
wf
=>
wf
.
uri
.
toString
()
===
folderUri
.
toString
()).
pop
()
:
undefined
;
return
this
.
debugService
.
createProcess
(
folder
,
configuration
).
then
(
process
=>
{
if
(
process
)
{
return
<
DebugSessionUUID
>
process
.
getId
();
}
return
TPromise
.
wrapError
<
DebugSessionUUID
>
(
new
Error
(
'
cannot create debug session
'
));
},
err
=>
{
return
TPromise
.
wrapError
(
err
&&
err
.
message
?
err
.
message
:
'
cannot start debug session
'
);
});
}
public
$customDebugAdapterRequest
(
sessionId
:
DebugSessionUUID
,
request
:
string
,
args
:
any
):
TPromise
<
any
>
{
const
process
=
this
.
debugService
.
findProcessByUUID
(
sessionId
);
if
(
process
)
{
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
55643dd7
...
...
@@ -393,7 +393,6 @@ export interface MainThreadDebugServiceShape extends IDisposable {
$registerDebugConfigurationProvider
(
type
:
string
,
hasProvideMethod
:
boolean
,
hasResolveMethod
:
boolean
,
handle
:
number
):
TPromise
<
any
>
;
$unregisterDebugConfigurationProvider
(
handle
:
number
):
TPromise
<
any
>
;
$startDebugging
(
folder
:
URI
|
undefined
,
nameOrConfig
:
string
|
vscode
.
DebugConfiguration
):
TPromise
<
boolean
>
;
$startDebugSession
(
folder
:
URI
|
undefined
,
config
:
vscode
.
DebugConfiguration
):
TPromise
<
DebugSessionUUID
>
;
$customDebugAdapterRequest
(
id
:
DebugSessionUUID
,
command
:
string
,
args
:
any
):
TPromise
<
any
>
;
}
...
...
src/vs/workbench/api/node/extHostDebugService.ts
浏览文件 @
55643dd7
...
...
@@ -98,14 +98,6 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
return
this
.
_debugServiceProxy
.
$startDebugging
(
folder
?
folder
.
uri
:
undefined
,
nameOrConfig
);
}
public
startDebugSession
(
folder
:
vscode
.
WorkspaceFolder
|
undefined
,
config
:
vscode
.
DebugConfiguration
):
TPromise
<
vscode
.
DebugSession
>
{
return
this
.
_debugServiceProxy
.
$startDebugSession
(
folder
?
folder
.
uri
:
undefined
,
config
).
then
((
id
:
DebugSessionUUID
)
=>
{
const
debugSession
=
new
ExtHostDebugSession
(
this
.
_debugServiceProxy
,
id
,
config
.
type
,
config
.
name
);
this
.
_debugSessions
.
set
(
id
,
debugSession
);
return
debugSession
;
});
}
public
$acceptDebugSessionStarted
(
id
:
DebugSessionUUID
,
type
:
string
,
name
:
string
):
void
{
let
debugSession
=
this
.
_debugSessions
.
get
(
id
);
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
55643dd7
...
...
@@ -591,11 +591,6 @@ export interface IDebugService {
*/
startDebugging
(
root
:
IWorkspaceFolder
,
configOrName
?:
IConfig
|
string
,
noDebug
?:
boolean
):
TPromise
<
any
>
;
/**
* Creates a new debug process. Depending on the configuration will either 'launch' or 'attach'.
*/
createProcess
(
root
:
IWorkspaceFolder
,
config
:
IConfig
):
TPromise
<
IProcess
>
;
/**
* Find process by ID.
*/
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
55643dd7
...
...
@@ -727,7 +727,7 @@ export class DebugService implements debug.IDebugService {
return
null
;
}
p
ublic
createProcess
(
root
:
IWorkspaceFolder
,
config
:
debug
.
IConfig
,
sessionId
?
:
string
):
TPromise
<
debug
.
IProcess
>
{
p
rivate
createProcess
(
root
:
IWorkspaceFolder
,
config
:
debug
.
IConfig
,
sessionId
:
string
):
TPromise
<
debug
.
IProcess
>
{
return
this
.
textFileService
.
saveAll
().
then
(()
=>
(
this
.
configurationManager
.
selectedLaunch
?
this
.
configurationManager
.
selectedLaunch
.
resolveConfiguration
(
config
)
:
TPromise
.
as
(
config
)).
then
(
resolvedConfig
=>
{
if
(
!
resolvedConfig
)
{
...
...
@@ -749,11 +749,6 @@ export class DebugService implements debug.IDebugService {
return
TPromise
.
wrapError
(
errors
.
create
(
message
,
{
actions
:
[
this
.
instantiationService
.
createInstance
(
debugactions
.
ConfigureAction
,
debugactions
.
ConfigureAction
.
ID
,
debugactions
.
ConfigureAction
.
LABEL
),
CloseAction
]
}));
}
if
(
!
sessionId
)
{
sessionId
=
generateUuid
();
this
.
updateStateAndEmit
(
sessionId
,
debug
.
State
.
Initializing
);
}
return
this
.
runPreLaunchTask
(
root
,
resolvedConfig
.
preLaunchTask
).
then
((
taskSummary
:
ITaskSummary
)
=>
{
const
errorCount
=
resolvedConfig
.
preLaunchTask
?
this
.
markerService
.
getStatistics
().
errors
:
0
;
const
successExitCode
=
taskSummary
&&
taskSummary
.
exitCode
===
0
;
...
...
@@ -1003,7 +998,7 @@ export class DebugService implements debug.IDebugService {
config
.
noDebug
=
process
.
configuration
.
noDebug
;
}
config
.
__restart
=
restartData
;
this
.
createProcess
(
process
.
session
.
root
,
config
).
then
(()
=>
c
(
null
),
err
=>
e
(
err
));
this
.
createProcess
(
process
.
session
.
root
,
config
,
process
.
getId
()
).
then
(()
=>
c
(
null
),
err
=>
e
(
err
));
},
300
);
});
}).
then
(()
=>
{
...
...
src/vs/workbench/parts/debug/test/common/mockDebug.ts
浏览文件 @
55643dd7
...
...
@@ -92,10 +92,6 @@ export class MockDebugService implements debug.IDebugService {
return
TPromise
.
as
(
null
);
}
public
createProcess
(
root
:
IWorkspaceFolder
,
config
:
debug
.
IConfig
):
TPromise
<
any
>
{
return
TPromise
.
as
(
null
);
}
public
findProcessByUUID
(
uuid
:
string
):
debug
.
IProcess
|
null
{
return
null
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录