Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
95bdfe00
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,发现更多精彩内容 >>
提交
95bdfe00
编写于
8月 20, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: move firstSessionStart to view model
上级
2719dec1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
19 deletion
+19
-19
src/vs/workbench/parts/debug/common/debugViewModel.ts
src/vs/workbench/parts/debug/common/debugViewModel.ts
+16
-14
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+3
-5
未找到文件。
src/vs/workbench/parts/debug/common/debugViewModel.ts
浏览文件 @
95bdfe00
...
...
@@ -9,6 +9,8 @@ import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/c
export
class
ViewModel
implements
IViewModel
{
firstSessionStart
=
true
;
private
_focusedStackFrame
:
IStackFrame
;
private
_focusedSession
:
ISession
;
private
_focusedThread
:
IThread
;
...
...
@@ -32,15 +34,15 @@ export class ViewModel implements IViewModel {
this
.
loadedScriptsSupportedContextKey
=
CONTEXT_LOADED_SCRIPTS_SUPPORTED
.
bindTo
(
contextKeyService
);
}
public
getId
():
string
{
getId
():
string
{
return
'
root
'
;
}
public
get
focusedSession
():
ISession
{
get
focusedSession
():
ISession
{
return
this
.
_focusedSession
;
}
public
get
focusedThread
():
IThread
{
get
focusedThread
():
IThread
{
if
(
this
.
_focusedStackFrame
)
{
return
this
.
_focusedStackFrame
.
thread
;
}
...
...
@@ -54,11 +56,11 @@ export class ViewModel implements IViewModel {
return
undefined
;
}
public
get
focusedStackFrame
():
IStackFrame
{
get
focusedStackFrame
():
IStackFrame
{
return
this
.
_focusedStackFrame
;
}
public
setFocus
(
stackFrame
:
IStackFrame
,
thread
:
IThread
,
session
:
ISession
,
explicit
:
boolean
):
void
{
setFocus
(
stackFrame
:
IStackFrame
,
thread
:
IThread
,
session
:
ISession
,
explicit
:
boolean
):
void
{
let
shouldEmit
=
this
.
_focusedSession
!==
session
||
this
.
_focusedThread
!==
thread
||
this
.
_focusedStackFrame
!==
stackFrame
;
if
(
this
.
_focusedSession
!==
session
)
{
...
...
@@ -75,42 +77,42 @@ export class ViewModel implements IViewModel {
}
}
public
get
onDidFocusSession
():
Event
<
ISession
>
{
get
onDidFocusSession
():
Event
<
ISession
>
{
return
this
.
_onDidFocusSession
.
event
;
}
public
get
onDidFocusStackFrame
():
Event
<
{
stackFrame
:
IStackFrame
,
explicit
:
boolean
}
>
{
get
onDidFocusStackFrame
():
Event
<
{
stackFrame
:
IStackFrame
,
explicit
:
boolean
}
>
{
return
this
.
_onDidFocusStackFrame
.
event
;
}
public
getSelectedExpression
():
IExpression
{
getSelectedExpression
():
IExpression
{
return
this
.
selectedExpression
;
}
public
setSelectedExpression
(
expression
:
IExpression
)
{
setSelectedExpression
(
expression
:
IExpression
)
{
this
.
selectedExpression
=
expression
;
this
.
expressionSelectedContextKey
.
set
(
!!
expression
);
this
.
_onDidSelectExpression
.
fire
(
expression
);
}
public
get
onDidSelectExpression
():
Event
<
IExpression
>
{
get
onDidSelectExpression
():
Event
<
IExpression
>
{
return
this
.
_onDidSelectExpression
.
event
;
}
public
getSelectedFunctionBreakpoint
():
IFunctionBreakpoint
{
getSelectedFunctionBreakpoint
():
IFunctionBreakpoint
{
return
this
.
selectedFunctionBreakpoint
;
}
public
setSelectedFunctionBreakpoint
(
functionBreakpoint
:
IFunctionBreakpoint
):
void
{
setSelectedFunctionBreakpoint
(
functionBreakpoint
:
IFunctionBreakpoint
):
void
{
this
.
selectedFunctionBreakpoint
=
functionBreakpoint
;
this
.
breakpointSelectedContextKey
.
set
(
!!
functionBreakpoint
);
}
public
isMultiSessionView
():
boolean
{
isMultiSessionView
():
boolean
{
return
this
.
multiSessionView
;
}
public
setMultiSessionView
(
isMultiSessionView
:
boolean
):
void
{
setMultiSessionView
(
isMultiSessionView
:
boolean
):
void
{
this
.
multiSessionView
=
isMultiSessionView
;
}
}
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
95bdfe00
...
...
@@ -75,7 +75,6 @@ export class DebugService implements IDebugService {
private
debugState
:
IContextKey
<
string
>
;
private
inDebugMode
:
IContextKey
<
boolean
>
;
private
breakpointsToSendOnResourceSaved
:
Set
<
string
>
;
private
firstSessionStart
:
boolean
;
private
skipRunningTask
:
boolean
;
private
previousState
:
State
;
...
...
@@ -117,7 +116,6 @@ export class DebugService implements IDebugService {
this
.
loadExceptionBreakpoints
(),
this
.
loadWatchExpressions
());
this
.
toDispose
.
push
(
this
.
model
);
this
.
viewModel
=
new
ViewModel
(
contextKeyService
);
this
.
firstSessionStart
=
true
;
this
.
registerListeners
();
}
...
...
@@ -646,16 +644,16 @@ export class DebugService implements IDebugService {
this
.
_onDidNewSession
.
fire
(
session
);
const
internalConsoleOptions
=
resolved
.
internalConsoleOptions
||
this
.
configurationService
.
getValue
<
IDebugConfiguration
>
(
'
debug
'
).
internalConsoleOptions
;
if
(
internalConsoleOptions
===
'
openOnSessionStart
'
||
(
this
.
firstSessionStart
&&
internalConsoleOptions
===
'
openOnFirstSessionStart
'
))
{
if
(
internalConsoleOptions
===
'
openOnSessionStart
'
||
(
this
.
viewModel
.
firstSessionStart
&&
internalConsoleOptions
===
'
openOnFirstSessionStart
'
))
{
this
.
panelService
.
openPanel
(
REPL_ID
,
false
).
done
(
undefined
,
errors
.
onUnexpectedError
);
}
const
openDebug
=
this
.
configurationService
.
getValue
<
IDebugConfiguration
>
(
'
debug
'
).
openDebug
;
// Open debug viewlet based on the visibility of the side bar and openDebug setting
if
(
openDebug
===
'
openOnSessionStart
'
||
(
openDebug
===
'
openOnFirstSessionStart
'
&&
this
.
firstSessionStart
))
{
if
(
openDebug
===
'
openOnSessionStart
'
||
(
openDebug
===
'
openOnFirstSessionStart
'
&&
this
.
viewModel
.
firstSessionStart
))
{
this
.
viewletService
.
openViewlet
(
VIEWLET_ID
);
}
this
.
firstSessionStart
=
false
;
this
.
viewModel
.
firstSessionStart
=
false
;
this
.
debugType
.
set
(
resolved
.
type
);
if
(
this
.
model
.
getSessions
().
length
>
1
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录