Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
cabc10fc
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,发现更多精彩内容 >>
提交
cabc10fc
编写于
8月 25, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: adopt completions api
上级
4bdd4e2d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
35 addition
and
2 deletion
+35
-2
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+4
-0
src/vs/workbench/parts/debug/common/debugSource.ts
src/vs/workbench/parts/debug/common/debugSource.ts
+2
-2
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+19
-0
src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts
...workbench/parts/debug/electron-browser/rawDebugSession.ts
+4
-0
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
+6
-0
未找到文件。
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
cabc10fc
...
...
@@ -9,6 +9,8 @@ import Event from 'vs/base/common/event';
import
severity
from
'
vs/base/common/severity
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
editor
=
require
(
'
vs/editor/common/editorCommon
'
);
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
import
{
ISuggestion
}
from
'
vs/editor/common/modes
'
;
import
{
Source
}
from
'
vs/workbench/parts/debug/common/debugSource
'
;
import
{
Range
}
from
'
vs/editor/common/core/range
'
;
import
{
RawContextKey
,
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
...
...
@@ -19,6 +21,7 @@ export const DEBUG_SERVICE_ID = 'debugService';
export
const
CONTEXT_IN_DEBUG_MODE
=
new
RawContextKey
<
boolean
>
(
'
inDebugMode
'
,
false
);
export
const
CONTEXT_NOT_IN_DEBUG_MODE
:
ContextKeyExpr
=
CONTEXT_IN_DEBUG_MODE
.
toNegated
();
export
const
EDITOR_CONTRIBUTION_ID
=
'
editor.contrib.debug
'
;
export
const
DEBUG_SCHEME
=
'
debug
'
;
// raw
...
...
@@ -414,6 +417,7 @@ export interface IDebugService {
continue
(
threadId
:
number
):
TPromise
<
void
>
;
pause
(
threadId
:
number
):
TPromise
<
any
>
;
restartFrame
(
frameId
:
number
):
TPromise
<
any
>
;
completions
(
text
:
string
,
position
:
Position
):
TPromise
<
ISuggestion
[]
>
;
}
// Editor interfaces
...
...
src/vs/workbench/parts/debug/common/debugSource.ts
浏览文件 @
cabc10fc
...
...
@@ -5,14 +5,14 @@
import
uri
from
'
vs/base/common/uri
'
;
import
paths
=
require
(
'
vs/base/common/paths
'
);
import
{
IModel
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
IModel
,
DEBUG_SCHEME
}
from
'
vs/workbench/parts/debug/common/debug
'
;
export
class
Source
{
public
uri
:
uri
;
public
available
:
boolean
;
private
static
INTERNAL_URI_PREFIX
=
'
debug://internal/
'
;
private
static
INTERNAL_URI_PREFIX
=
`
${
DEBUG_SCHEME
}
://internal/`
;
constructor
(
public
raw
:
DebugProtocol
.
Source
,
available
=
true
)
{
this
.
uri
=
raw
.
path
?
uri
.
file
(
paths
.
normalize
(
raw
.
path
))
:
uri
.
parse
(
Source
.
INTERNAL_URI_PREFIX
+
raw
.
name
);
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
cabc10fc
...
...
@@ -17,6 +17,8 @@ import severity from 'vs/base/common/severity';
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
aria
=
require
(
'
vs/base/browser/ui/aria/aria
'
);
import
editorbrowser
=
require
(
'
vs/editor/browser/editorBrowser
'
);
import
{
ISuggestion
}
from
'
vs/editor/common/modes
'
;
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
import
{
IContextKeyService
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IMarkerService
}
from
'
vs/platform/markers/common/markers
'
;
import
{
ILifecycleService
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
...
...
@@ -947,6 +949,23 @@ export class DebugService implements debug.IDebugService {
return
this
.
session
.
restartFrame
({
frameId
});
}
public
completions
(
text
:
string
,
position
:
Position
):
TPromise
<
ISuggestion
[]
>
{
if
(
!
this
.
session
)
{
return
TPromise
.
as
([]);
}
return
this
.
session
.
completions
({
frameId
:
this
.
viewModel
.
getFocusedStackFrame
().
frameId
,
text
,
column
:
position
.
column
,
line
:
position
.
lineNumber
}).
then
(
response
=>
response
.
body
.
targets
.
map
(
item
=>
({
label
:
item
.
label
,
insertText
:
item
.
text
||
item
.
label
,
type
:
'
property
'
})),
err
=>
[]);
}
private
lazyTransitionToRunningState
(
threadId
?:
number
):
void
{
let
setNewFocusedStackFrameScheduler
:
RunOnceScheduler
;
...
...
src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts
浏览文件 @
cabc10fc
...
...
@@ -274,6 +274,10 @@ export class RawDebugSession extends v8.V8Protocol implements debug.IRawDebugSes
return
this
.
send
(
'
restartFrame
'
,
args
);
}
public
completions
(
args
:
DebugProtocol
.
CompletionsArguments
):
TPromise
<
DebugProtocol
.
CompletionsResponse
>
{
return
this
.
send
(
'
completions
'
,
args
);
}
public
disconnect
(
restart
=
false
,
force
=
false
):
TPromise
<
DebugProtocol
.
DisconnectResponse
>
{
if
(
this
.
stopServerPending
&&
force
)
{
return
this
.
stopServer
();
...
...
src/vs/workbench/parts/debug/test/common/mockDebugService.ts
浏览文件 @
cabc10fc
...
...
@@ -6,6 +6,8 @@
import
Event
from
'
vs/base/common/event
'
;
import
severity
from
'
vs/base/common/severity
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
ISuggestion
}
from
'
vs/editor/common/modes
'
;
import
{
Position
}
from
'
vs/editor/common/core/position
'
;
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
);
import
{
Source
}
from
'
vs/workbench/parts/debug/common/debugSource
'
;
...
...
@@ -134,6 +136,10 @@ export class MockDebugService implements debug.IDebugService {
public
restartFrame
(
frameId
:
number
):
TPromise
<
any
>
{
return
TPromise
.
as
(
null
);
}
public
completions
(
text
:
string
,
position
:
Position
):
TPromise
<
ISuggestion
[]
>
{
return
TPromise
.
as
([]);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录