Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d589f2f1
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,发现更多精彩内容 >>
提交
d589f2f1
编写于
12月 14, 2017
作者:
A
Andre Weinand
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove usage of CustomMarshaller for DebugService (#40169)
上级
475ac42d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
15 deletion
+19
-15
src/vs/workbench/api/electron-browser/mainThreadDebugService.ts
.../workbench/api/electron-browser/mainThreadDebugService.ts
+3
-2
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+7
-6
src/vs/workbench/api/node/extHostDebugService.ts
src/vs/workbench/api/node/extHostDebugService.ts
+9
-7
未找到文件。
src/vs/workbench/api/electron-browser/mainThreadDebugService.ts
浏览文件 @
d589f2f1
...
@@ -143,8 +143,9 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape {
...
@@ -143,8 +143,9 @@ export class MainThreadDebugService implements MainThreadDebugServiceShape {
return
TPromise
.
wrap
<
void
>
(
undefined
);
return
TPromise
.
wrap
<
void
>
(
undefined
);
}
}
public
$startDebugging
(
folderUri
:
uri
|
undefined
,
nameOrConfiguration
:
string
|
IConfig
):
TPromise
<
boolean
>
{
public
$startDebugging
(
_folderUri
:
uri
|
undefined
,
nameOrConfiguration
:
string
|
IConfig
):
TPromise
<
boolean
>
{
const
folder
=
folderUri
?
this
.
contextService
.
getWorkspace
().
folders
.
filter
(
wf
=>
wf
.
uri
.
toString
()
===
folderUri
.
toString
()).
pop
()
:
undefined
;
const
folderUriString
=
_folderUri
?
uri
.
revive
(
_folderUri
).
toString
()
:
undefined
;
const
folder
=
folderUriString
?
this
.
contextService
.
getWorkspace
().
folders
.
filter
(
wf
=>
wf
.
uri
.
toString
()
===
folderUriString
).
pop
()
:
undefined
;
return
this
.
debugService
.
startDebugging
(
folder
,
nameOrConfiguration
).
then
(
x
=>
{
return
this
.
debugService
.
startDebugging
(
folder
,
nameOrConfiguration
).
then
(
x
=>
{
return
true
;
return
true
;
},
err
=>
{
},
err
=>
{
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
d589f2f1
...
@@ -31,6 +31,7 @@ import * as modes from 'vs/editor/common/modes';
...
@@ -31,6 +31,7 @@ import * as modes from 'vs/editor/common/modes';
import
{
ITextSource
}
from
'
vs/editor/common/model/textSource
'
;
import
{
ITextSource
}
from
'
vs/editor/common/model/textSource
'
;
import
{
IConfigurationData
,
ConfigurationTarget
,
IConfigurationModel
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IConfigurationData
,
ConfigurationTarget
,
IConfigurationModel
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IConfig
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
IPickOpenEntry
,
IPickOptions
}
from
'
vs/platform/quickOpen/common/quickOpen
'
;
import
{
IPickOpenEntry
,
IPickOptions
}
from
'
vs/platform/quickOpen/common/quickOpen
'
;
import
{
SaveReason
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
import
{
SaveReason
}
from
'
vs/workbench/services/textfile/common/textfiles
'
;
...
@@ -446,7 +447,7 @@ export type DebugSessionUUID = string;
...
@@ -446,7 +447,7 @@ export type DebugSessionUUID = string;
export
interface
MainThreadDebugServiceShape
extends
IDisposable
{
export
interface
MainThreadDebugServiceShape
extends
IDisposable
{
$registerDebugConfigurationProvider
(
type
:
string
,
hasProvideMethod
:
boolean
,
hasResolveMethod
:
boolean
,
handle
:
number
):
TPromise
<
any
>
;
$registerDebugConfigurationProvider
(
type
:
string
,
hasProvideMethod
:
boolean
,
hasResolveMethod
:
boolean
,
handle
:
number
):
TPromise
<
any
>
;
$unregisterDebugConfigurationProvider
(
handle
:
number
):
TPromise
<
any
>
;
$unregisterDebugConfigurationProvider
(
handle
:
number
):
TPromise
<
any
>
;
$startDebugging
(
folder
:
U
RI
|
undefined
,
nameOrConfig
:
string
|
vscode
.
DebugConfiguration
):
TPromise
<
boolean
>
;
$startDebugging
(
folder
:
U
riComponents
|
undefined
,
nameOrConfig
:
string
|
vscode
.
DebugConfiguration
):
TPromise
<
boolean
>
;
$customDebugAdapterRequest
(
id
:
DebugSessionUUID
,
command
:
string
,
args
:
any
):
TPromise
<
any
>
;
$customDebugAdapterRequest
(
id
:
DebugSessionUUID
,
command
:
string
,
args
:
any
):
TPromise
<
any
>
;
$appendDebugConsole
(
value
:
string
):
TPromise
<
any
>
;
$appendDebugConsole
(
value
:
string
):
TPromise
<
any
>
;
$startBreakpointEvents
():
TPromise
<
any
>
;
$startBreakpointEvents
():
TPromise
<
any
>
;
...
@@ -691,7 +692,7 @@ export interface IBreakpointData {
...
@@ -691,7 +692,7 @@ export interface IBreakpointData {
export
interface
ISourceBreakpointData
extends
IBreakpointData
{
export
interface
ISourceBreakpointData
extends
IBreakpointData
{
type
:
'
source
'
;
type
:
'
source
'
;
uri
:
U
RI
;
uri
:
U
riComponents
;
line
:
number
;
line
:
number
;
character
:
number
;
character
:
number
;
}
}
...
@@ -708,8 +709,8 @@ export interface IBreakpointsDelta {
...
@@ -708,8 +709,8 @@ export interface IBreakpointsDelta {
}
}
export
interface
ExtHostDebugServiceShape
{
export
interface
ExtHostDebugServiceShape
{
$resolveDebugConfiguration
(
handle
:
number
,
folder
:
U
RI
|
undefined
,
debugConfiguration
:
any
):
TPromise
<
any
>
;
$resolveDebugConfiguration
(
handle
:
number
,
folder
:
U
riComponents
|
undefined
,
debugConfiguration
:
IConfig
):
TPromise
<
IConfig
>
;
$provideDebugConfigurations
(
handle
:
number
,
folder
:
U
RI
|
undefined
):
TPromise
<
any
[]
>
;
$provideDebugConfigurations
(
handle
:
number
,
folder
:
U
riComponents
|
undefined
):
TPromise
<
IConfig
[]
>
;
$acceptDebugSessionStarted
(
id
:
DebugSessionUUID
,
type
:
string
,
name
:
string
):
void
;
$acceptDebugSessionStarted
(
id
:
DebugSessionUUID
,
type
:
string
,
name
:
string
):
void
;
$acceptDebugSessionTerminated
(
id
:
DebugSessionUUID
,
type
:
string
,
name
:
string
):
void
;
$acceptDebugSessionTerminated
(
id
:
DebugSessionUUID
,
type
:
string
,
name
:
string
):
void
;
$acceptDebugSessionActiveChanged
(
id
:
DebugSessionUUID
|
undefined
,
type
?:
string
,
name
?:
string
):
void
;
$acceptDebugSessionActiveChanged
(
id
:
DebugSessionUUID
|
undefined
,
type
?:
string
,
name
?:
string
):
void
;
...
@@ -733,7 +734,7 @@ export interface ExtHostWindowShape {
...
@@ -733,7 +734,7 @@ export interface ExtHostWindowShape {
export
const
MainContext
=
{
export
const
MainContext
=
{
MainThreadCommands
:
<
ProxyIdentifier
<
MainThreadCommandsShape
>>
createMainId
<
MainThreadCommandsShape
>
(
'
MainThreadCommands
'
),
MainThreadCommands
:
<
ProxyIdentifier
<
MainThreadCommandsShape
>>
createMainId
<
MainThreadCommandsShape
>
(
'
MainThreadCommands
'
),
MainThreadConfiguration
:
createMainId
<
MainThreadConfigurationShape
>
(
'
MainThreadConfiguration
'
,
ProxyType
.
CustomMarshaller
),
MainThreadConfiguration
:
createMainId
<
MainThreadConfigurationShape
>
(
'
MainThreadConfiguration
'
,
ProxyType
.
CustomMarshaller
),
MainThreadDebugService
:
createMainId
<
MainThreadDebugServiceShape
>
(
'
MainThreadDebugService
'
,
ProxyType
.
CustomMarshaller
),
MainThreadDebugService
:
createMainId
<
MainThreadDebugServiceShape
>
(
'
MainThreadDebugService
'
),
MainThreadDecorations
:
createMainId
<
MainThreadDecorationsShape
>
(
'
MainThreadDecorations
'
),
MainThreadDecorations
:
createMainId
<
MainThreadDecorationsShape
>
(
'
MainThreadDecorations
'
),
MainThreadDiagnostics
:
createMainId
<
MainThreadDiagnosticsShape
>
(
'
MainThreadDiagnostics
'
),
MainThreadDiagnostics
:
createMainId
<
MainThreadDiagnosticsShape
>
(
'
MainThreadDiagnostics
'
),
MainThreadDialogs
:
createMainId
<
MainThreadDiaglogsShape
>
(
'
MainThreadDiaglogs
'
),
MainThreadDialogs
:
createMainId
<
MainThreadDiaglogsShape
>
(
'
MainThreadDiaglogs
'
),
...
@@ -764,7 +765,7 @@ export const ExtHostContext = {
...
@@ -764,7 +765,7 @@ export const ExtHostContext = {
ExtHostCommands
:
createExtId
<
ExtHostCommandsShape
>
(
'
ExtHostCommands
'
),
ExtHostCommands
:
createExtId
<
ExtHostCommandsShape
>
(
'
ExtHostCommands
'
),
ExtHostConfiguration
:
createExtId
<
ExtHostConfigurationShape
>
(
'
ExtHostConfiguration
'
,
ProxyType
.
CustomMarshaller
),
ExtHostConfiguration
:
createExtId
<
ExtHostConfigurationShape
>
(
'
ExtHostConfiguration
'
,
ProxyType
.
CustomMarshaller
),
ExtHostDiagnostics
:
createExtId
<
ExtHostDiagnosticsShape
>
(
'
ExtHostDiagnostics
'
),
ExtHostDiagnostics
:
createExtId
<
ExtHostDiagnosticsShape
>
(
'
ExtHostDiagnostics
'
),
ExtHostDebugService
:
createExtId
<
ExtHostDebugServiceShape
>
(
'
ExtHostDebugService
'
,
ProxyType
.
CustomMarshaller
),
ExtHostDebugService
:
createExtId
<
ExtHostDebugServiceShape
>
(
'
ExtHostDebugService
'
),
ExtHostDecorations
:
createExtId
<
ExtHostDecorationsShape
>
(
'
ExtHostDecorations
'
),
ExtHostDecorations
:
createExtId
<
ExtHostDecorationsShape
>
(
'
ExtHostDecorations
'
),
ExtHostDocumentsAndEditors
:
createExtId
<
ExtHostDocumentsAndEditorsShape
>
(
'
ExtHostDocumentsAndEditors
'
),
ExtHostDocumentsAndEditors
:
createExtId
<
ExtHostDocumentsAndEditorsShape
>
(
'
ExtHostDocumentsAndEditors
'
),
ExtHostDocuments
:
createExtId
<
ExtHostDocumentsShape
>
(
'
ExtHostDocuments
'
),
ExtHostDocuments
:
createExtId
<
ExtHostDocumentsShape
>
(
'
ExtHostDocuments
'
),
...
...
src/vs/workbench/api/node/extHostDebugService.ts
浏览文件 @
d589f2f1
...
@@ -11,7 +11,7 @@ import { MainContext, MainThreadDebugServiceShape, ExtHostDebugServiceShape, Deb
...
@@ -11,7 +11,7 @@ import { MainContext, MainThreadDebugServiceShape, ExtHostDebugServiceShape, Deb
import
{
ExtHostWorkspace
}
from
'
vs/workbench/api/node/extHostWorkspace
'
;
import
{
ExtHostWorkspace
}
from
'
vs/workbench/api/node/extHostWorkspace
'
;
import
*
as
vscode
from
'
vscode
'
;
import
*
as
vscode
from
'
vscode
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
URI
,
{
UriComponents
}
from
'
vs/base/common/uri
'
;
import
{
Disposable
,
Position
,
Location
,
SourceBreakpoint
,
FunctionBreakpoint
}
from
'
vs/workbench/api/node/extHostTypes
'
;
import
{
Disposable
,
Position
,
Location
,
SourceBreakpoint
,
FunctionBreakpoint
}
from
'
vs/workbench/api/node/extHostTypes
'
;
...
@@ -138,7 +138,8 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
...
@@ -138,7 +138,8 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
if
(
bp
.
type
===
'
function
'
)
{
if
(
bp
.
type
===
'
function
'
)
{
return
new
FunctionBreakpoint
(
bp
.
enabled
,
bp
.
condition
,
bp
.
hitCondition
,
bp
.
functionName
);
return
new
FunctionBreakpoint
(
bp
.
enabled
,
bp
.
condition
,
bp
.
hitCondition
,
bp
.
functionName
);
}
}
return
new
SourceBreakpoint
(
bp
.
enabled
,
bp
.
condition
,
bp
.
hitCondition
,
new
Location
(
bp
.
uri
,
new
Position
(
bp
.
line
,
bp
.
character
)));
const
uri
=
URI
.
revive
(
bp
.
uri
);
return
new
SourceBreakpoint
(
bp
.
enabled
,
bp
.
condition
,
bp
.
hitCondition
,
new
Location
(
uri
,
new
Position
(
bp
.
line
,
bp
.
character
)));
}
}
public
registerDebugConfigurationProvider
(
type
:
string
,
provider
:
vscode
.
DebugConfigurationProvider
):
vscode
.
Disposable
{
public
registerDebugConfigurationProvider
(
type
:
string
,
provider
:
vscode
.
DebugConfigurationProvider
):
vscode
.
Disposable
{
...
@@ -156,7 +157,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
...
@@ -156,7 +157,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
});
});
}
}
public
$provideDebugConfigurations
(
handle
:
number
,
folderUri
:
U
RI
|
undefined
):
TPromise
<
vscode
.
DebugConfiguration
[]
>
{
public
$provideDebugConfigurations
(
handle
:
number
,
folderUri
:
U
riComponents
|
undefined
):
TPromise
<
vscode
.
DebugConfiguration
[]
>
{
let
handler
=
this
.
_handlers
.
get
(
handle
);
let
handler
=
this
.
_handlers
.
get
(
handle
);
if
(
!
handler
)
{
if
(
!
handler
)
{
return
TPromise
.
wrapError
<
vscode
.
DebugConfiguration
[]
>
(
new
Error
(
'
no handler found
'
));
return
TPromise
.
wrapError
<
vscode
.
DebugConfiguration
[]
>
(
new
Error
(
'
no handler found
'
));
...
@@ -167,7 +168,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
...
@@ -167,7 +168,7 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
return
asWinJsPromise
(
token
=>
handler
.
provideDebugConfigurations
(
this
.
getFolder
(
folderUri
),
token
));
return
asWinJsPromise
(
token
=>
handler
.
provideDebugConfigurations
(
this
.
getFolder
(
folderUri
),
token
));
}
}
public
$resolveDebugConfiguration
(
handle
:
number
,
folderUri
:
U
RI
|
undefined
,
debugConfiguration
:
vscode
.
DebugConfiguration
):
TPromise
<
vscode
.
DebugConfiguration
>
{
public
$resolveDebugConfiguration
(
handle
:
number
,
folderUri
:
U
riComponents
|
undefined
,
debugConfiguration
:
vscode
.
DebugConfiguration
):
TPromise
<
vscode
.
DebugConfiguration
>
{
let
handler
=
this
.
_handlers
.
get
(
handle
);
let
handler
=
this
.
_handlers
.
get
(
handle
);
if
(
!
handler
)
{
if
(
!
handler
)
{
return
TPromise
.
wrapError
<
vscode
.
DebugConfiguration
>
(
new
Error
(
'
no handler found
'
));
return
TPromise
.
wrapError
<
vscode
.
DebugConfiguration
>
(
new
Error
(
'
no handler found
'
));
...
@@ -232,10 +233,11 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
...
@@ -232,10 +233,11 @@ export class ExtHostDebugService implements ExtHostDebugServiceShape {
this
.
_onDidReceiveDebugSessionCustomEvent
.
fire
(
ee
);
this
.
_onDidReceiveDebugSessionCustomEvent
.
fire
(
ee
);
}
}
private
getFolder
(
folderUri
:
URI
|
undefined
)
{
private
getFolder
(
_folderUri
:
UriComponents
|
undefined
)
{
if
(
folderUri
)
{
if
(
_folderUri
)
{
const
folderUriString
=
URI
.
revive
(
_folderUri
).
toString
();
const
folders
=
this
.
_workspace
.
getWorkspaceFolders
();
const
folders
=
this
.
_workspace
.
getWorkspaceFolders
();
const
found
=
folders
.
filter
(
f
=>
f
.
uri
.
toString
()
===
folderUri
.
toString
()
);
const
found
=
folders
.
filter
(
f
=>
f
.
uri
.
toString
()
===
folderUri
String
);
if
(
found
&&
found
.
length
>
0
)
{
if
(
found
&&
found
.
length
>
0
)
{
return
found
[
0
];
return
found
[
0
];
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录