Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
48701207
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,发现更多精彩内容 >>
提交
48701207
编写于
1月 18, 2017
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: remove SessionRequestType
上级
f1ef98af
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
9 addition
and
18 deletion
+9
-18
src/vs/workbench/parts/debug/browser/debugActions.ts
src/vs/workbench/parts/debug/browser/debugActions.ts
+2
-2
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
+1
-1
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+1
-7
src/vs/workbench/parts/debug/common/debugModel.ts
src/vs/workbench/parts/debug/common/debugModel.ts
+4
-0
src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts
...workbench/parts/debug/electron-browser/rawDebugSession.ts
+0
-3
src/vs/workbench/parts/debug/test/common/mockDebug.ts
src/vs/workbench/parts/debug/test/common/mockDebug.ts
+1
-5
未找到文件。
src/vs/workbench/parts/debug/browser/debugActions.ts
浏览文件 @
48701207
...
@@ -11,7 +11,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
...
@@ -11,7 +11,7 @@ import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IDebugService
,
State
,
IProcess
,
SessionRequestType
,
IThread
,
IEnablement
,
IBreakpoint
,
IStackFrame
,
IFunctionBreakpoint
,
IDebugEditorContribution
,
EDITOR_CONTRIBUTION_ID
,
IExpression
,
REPL_ID
}
import
{
IDebugService
,
State
,
IProcess
,
IThread
,
IEnablement
,
IBreakpoint
,
IStackFrame
,
IFunctionBreakpoint
,
IDebugEditorContribution
,
EDITOR_CONTRIBUTION_ID
,
IExpression
,
REPL_ID
}
from
'
vs/workbench/parts/debug/common/debug
'
;
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
Variable
,
Expression
,
Thread
,
Breakpoint
,
Process
}
from
'
vs/workbench/parts/debug/common/debugModel
'
;
import
{
Variable
,
Expression
,
Thread
,
Breakpoint
,
Process
}
from
'
vs/workbench/parts/debug/common/debugModel
'
;
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
...
@@ -179,7 +179,7 @@ export class RestartAction extends AbstractDebugAction {
...
@@ -179,7 +179,7 @@ export class RestartAction extends AbstractDebugAction {
}
}
private
setLabel
(
process
:
IProcess
):
void
{
private
setLabel
(
process
:
IProcess
):
void
{
this
.
updateLabel
(
process
&&
process
.
session
.
requestType
===
SessionRequestType
.
ATTACH
?
RestartAction
.
RECONNECT_LABEL
:
RestartAction
.
LABEL
);
this
.
updateLabel
(
process
&&
process
.
isAttach
()
?
RestartAction
.
RECONNECT_LABEL
:
RestartAction
.
LABEL
);
}
}
public
run
(
process
:
IProcess
):
TPromise
<
any
>
{
public
run
(
process
:
IProcess
):
TPromise
<
any
>
{
...
...
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
浏览文件 @
48701207
...
@@ -209,7 +209,7 @@ export class DebugActionsWidget implements IWorkbenchContribution {
...
@@ -209,7 +209,7 @@ export class DebugActionsWidget implements IWorkbenchContribution {
const
state
=
this
.
debugService
.
state
;
const
state
=
this
.
debugService
.
state
;
const
process
=
this
.
debugService
.
getViewModel
().
focusedProcess
;
const
process
=
this
.
debugService
.
getViewModel
().
focusedProcess
;
const
attached
=
process
&&
!
strings
.
equalsIgnoreCase
(
process
.
session
.
configuration
.
type
,
'
extensionHost
'
)
&&
process
.
session
.
requestType
===
debug
.
SessionRequestType
.
ATTACH
;
const
attached
=
process
&&
!
strings
.
equalsIgnoreCase
(
process
.
session
.
configuration
.
type
,
'
extensionHost
'
)
&&
process
.
isAttach
()
;
return
this
.
allActions
.
filter
(
a
=>
{
return
this
.
allActions
.
filter
(
a
=>
{
if
(
a
.
id
===
ContinueAction
.
ID
)
{
if
(
a
.
id
===
ContinueAction
.
ID
)
{
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
48701207
...
@@ -68,14 +68,7 @@ export interface IExpression extends ITreeElement, IExpressionContainer {
...
@@ -68,14 +68,7 @@ export interface IExpression extends ITreeElement, IExpressionContainer {
type
?:
string
;
type
?:
string
;
}
}
export
enum
SessionRequestType
{
LAUNCH
,
ATTACH
,
LAUNCH_NO_DEBUG
}
export
interface
ISession
{
export
interface
ISession
{
requestType
:
SessionRequestType
;
stackTrace
(
args
:
DebugProtocol
.
StackTraceArguments
):
TPromise
<
DebugProtocol
.
StackTraceResponse
>
;
stackTrace
(
args
:
DebugProtocol
.
StackTraceArguments
):
TPromise
<
DebugProtocol
.
StackTraceResponse
>
;
scopes
(
args
:
DebugProtocol
.
ScopesArguments
):
TPromise
<
DebugProtocol
.
ScopesResponse
>
;
scopes
(
args
:
DebugProtocol
.
ScopesArguments
):
TPromise
<
DebugProtocol
.
ScopesResponse
>
;
variables
(
args
:
DebugProtocol
.
VariablesArguments
):
TPromise
<
DebugProtocol
.
VariablesResponse
>
;
variables
(
args
:
DebugProtocol
.
VariablesArguments
):
TPromise
<
DebugProtocol
.
VariablesResponse
>
;
...
@@ -104,6 +97,7 @@ export interface IProcess extends ITreeElement {
...
@@ -104,6 +97,7 @@ export interface IProcess extends ITreeElement {
name
:
string
;
name
:
string
;
configuration
:
IConfig
;
configuration
:
IConfig
;
session
:
ISession
;
session
:
ISession
;
isAttach
():
boolean
;
getThread
(
threadId
:
number
):
IThread
;
getThread
(
threadId
:
number
):
IThread
;
getAllThreads
():
IThread
[];
getAllThreads
():
IThread
[];
completions
(
frameId
:
number
,
text
:
string
,
position
:
Position
,
overwriteBefore
:
number
):
TPromise
<
ISuggestion
[]
>
;
completions
(
frameId
:
number
,
text
:
string
,
position
:
Position
,
overwriteBefore
:
number
):
TPromise
<
ISuggestion
[]
>
;
...
...
src/vs/workbench/parts/debug/common/debugModel.ts
浏览文件 @
48701207
...
@@ -504,6 +504,10 @@ export class Process implements debug.IProcess {
...
@@ -504,6 +504,10 @@ export class Process implements debug.IProcess {
return
this
.
configuration
.
name
;
return
this
.
configuration
.
name
;
}
}
public
isAttach
():
boolean
{
return
this
.
configuration
.
type
===
'
attach
'
;
}
public
getThread
(
threadId
:
number
):
Thread
{
public
getThread
(
threadId
:
number
):
Thread
{
return
this
.
threads
.
get
(
threadId
);
return
this
.
threads
.
get
(
threadId
);
}
}
...
...
src/vs/workbench/parts/debug/electron-browser/rawDebugSession.ts
浏览文件 @
48701207
...
@@ -50,7 +50,6 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession {
...
@@ -50,7 +50,6 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession {
private
socket
:
net
.
Socket
=
null
;
private
socket
:
net
.
Socket
=
null
;
private
cachedInitServer
:
TPromise
<
void
>
;
private
cachedInitServer
:
TPromise
<
void
>
;
private
startTime
:
number
;
private
startTime
:
number
;
public
requestType
:
debug
.
SessionRequestType
;
public
disconnected
:
boolean
;
public
disconnected
:
boolean
;
private
sentPromises
:
TPromise
<
DebugProtocol
.
Response
>
[];
private
sentPromises
:
TPromise
<
DebugProtocol
.
Response
>
[];
private
capabilities
:
DebugProtocol
.
Capabilities
;
private
capabilities
:
DebugProtocol
.
Capabilities
;
...
@@ -241,12 +240,10 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession {
...
@@ -241,12 +240,10 @@ export class RawDebugSession extends v8.V8Protocol implements debug.ISession {
}
}
public
launch
(
args
:
DebugProtocol
.
LaunchRequestArguments
):
TPromise
<
DebugProtocol
.
LaunchResponse
>
{
public
launch
(
args
:
DebugProtocol
.
LaunchRequestArguments
):
TPromise
<
DebugProtocol
.
LaunchResponse
>
{
this
.
requestType
=
args
.
noDebug
?
debug
.
SessionRequestType
.
LAUNCH_NO_DEBUG
:
debug
.
SessionRequestType
.
LAUNCH
;
return
this
.
send
(
'
launch
'
,
args
).
then
(
response
=>
this
.
readCapabilities
(
response
));
return
this
.
send
(
'
launch
'
,
args
).
then
(
response
=>
this
.
readCapabilities
(
response
));
}
}
public
attach
(
args
:
DebugProtocol
.
AttachRequestArguments
):
TPromise
<
DebugProtocol
.
AttachResponse
>
{
public
attach
(
args
:
DebugProtocol
.
AttachRequestArguments
):
TPromise
<
DebugProtocol
.
AttachResponse
>
{
this
.
requestType
=
debug
.
SessionRequestType
.
ATTACH
;
return
this
.
send
(
'
attach
'
,
args
).
then
(
response
=>
this
.
readCapabilities
(
response
));
return
this
.
send
(
'
attach
'
,
args
).
then
(
response
=>
this
.
readCapabilities
(
response
));
}
}
...
...
src/vs/workbench/parts/debug/test/common/mockDebug.ts
浏览文件 @
48701207
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
import
uri
from
'
vs/base/common/uri
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
Event
from
'
vs/base/common/event
'
;
import
Event
from
'
vs/base/common/event
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
debug
=
require
(
'
vs/workbench/parts/debug/common/debug
'
)
;
import
*
as
debug
from
'
vs/workbench/parts/debug/common/debug
'
;
export
class
MockDebugService
implements
debug
.
IDebugService
{
export
class
MockDebugService
implements
debug
.
IDebugService
{
public
_serviceBrand
:
any
;
public
_serviceBrand
:
any
;
...
@@ -98,10 +98,6 @@ export class MockSession implements debug.ISession {
...
@@ -98,10 +98,6 @@ export class MockSession implements debug.ISession {
return
'
mockrawsession
'
;
return
'
mockrawsession
'
;
}
}
public
get
requestType
()
{
return
debug
.
SessionRequestType
.
LAUNCH
;
}
public
getLengthInSeconds
():
number
{
public
getLengthInSeconds
():
number
{
return
100
;
return
100
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录