Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d597574a
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,发现更多精彩内容 >>
提交
d597574a
编写于
6月 01, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: simplify view state manipulation
fixes #6763
上级
f1add038
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
16 deletion
+14
-16
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+14
-16
未找到文件。
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
d597574a
...
...
@@ -494,7 +494,7 @@ export class DebugService implements debug.IDebugService {
this
.
model
.
removeWatchExpressions
(
id
);
}
public
createSession
(
noDebug
:
boolean
,
configuration
?:
debug
.
IConfig
,
changeViewState
=
!
this
.
partService
.
isSideBarHidden
()
):
TPromise
<
any
>
{
public
createSession
(
noDebug
:
boolean
,
configuration
?:
debug
.
IConfig
):
TPromise
<
any
>
{
this
.
removeReplExpressions
();
return
this
.
textFileService
.
saveAll
()
// make sure all dirty files are saved
...
...
@@ -527,7 +527,7 @@ export class DebugService implements debug.IDebugService {
const
successExitCode
=
taskSummary
&&
taskSummary
.
exitCode
===
0
;
const
failureExitCode
=
taskSummary
&&
taskSummary
.
exitCode
!==
undefined
&&
taskSummary
.
exitCode
!==
0
;
if
(
successExitCode
||
(
errorCount
===
0
&&
!
failureExitCode
))
{
return
this
.
doCreateSession
(
configuration
,
changeViewState
);
return
this
.
doCreateSession
(
configuration
);
}
this
.
messageService
.
show
(
severity
.
Error
,
{
...
...
@@ -536,7 +536,7 @@ export class DebugService implements debug.IDebugService {
nls
.
localize
(
'
preLaunchTaskExitCode
'
,
"
The preLaunchTask '{0}' terminated with exit code {1}.
"
,
configuration
.
preLaunchTask
,
taskSummary
.
exitCode
),
actions
:
[
CloseAction
,
new
Action
(
'
debug.continue
'
,
nls
.
localize
(
'
debugAnyway
'
,
"
Debug Anyway
"
),
null
,
true
,
()
=>
{
this
.
messageService
.
hideAll
();
return
this
.
doCreateSession
(
configuration
,
changeViewState
);
return
this
.
doCreateSession
(
configuration
);
})]
});
},
(
err
:
TaskError
)
=>
{
...
...
@@ -552,7 +552,7 @@ export class DebugService implements debug.IDebugService {
}))));
}
private
doCreateSession
(
configuration
:
debug
.
IConfig
,
changeViewState
:
boolean
):
TPromise
<
any
>
{
private
doCreateSession
(
configuration
:
debug
.
IConfig
):
TPromise
<
any
>
{
this
.
setStateAndEmit
(
debug
.
State
.
Initializing
);
this
.
telemetryService
.
getTelemetryInfo
().
then
(
info
=>
{
...
...
@@ -581,16 +581,14 @@ export class DebugService implements debug.IDebugService {
this
.
model
.
setExceptionBreakpoints
(
this
.
session
.
configuration
.
capabilities
.
exceptionBreakpointFilters
);
return
configuration
.
request
===
'
attach
'
?
this
.
session
.
attach
(
configuration
)
:
this
.
session
.
launch
(
configuration
);
}).
then
((
result
:
DebugProtocol
.
Response
)
=>
{
if
(
changeViewState
)
{
if
(
configuration
.
internalConsoleOptions
===
'
openOnSessionStart
'
||
(
!
this
.
viewModel
.
changedWorkbenchViewState
&&
configuration
.
internalConsoleOptions
!==
'
neverOpen
'
))
{
this
.
panelService
.
openPanel
(
debug
.
REPL_ID
,
false
).
done
(
undefined
,
errors
.
onUnexpectedError
);
}
if
(
configuration
.
internalConsoleOptions
===
'
openOnSessionStart
'
||
(
!
this
.
viewModel
.
changedWorkbenchViewState
&&
configuration
.
internalConsoleOptions
!==
'
neverOpen
'
))
{
this
.
panelService
.
openPanel
(
debug
.
REPL_ID
,
false
).
done
(
undefined
,
errors
.
onUnexpectedError
);
}
if
(
!
this
.
viewModel
.
changedWorkbenchViewState
)
{
// We only want to change the workbench view state on the first debug session #5738
this
.
viewModel
.
changedWorkbenchViewState
=
true
;
this
.
viewletService
.
openViewlet
(
debug
.
VIEWLET_ID
);
}
if
(
!
this
.
viewModel
.
changedWorkbenchViewState
&&
!
this
.
partService
.
isSideBarHidden
())
{
// We only want to change the workbench view state on the first debug session #5738 and if the side bar is not hidden
this
.
viewModel
.
changedWorkbenchViewState
=
true
;
this
.
viewletService
.
openViewlet
(
debug
.
VIEWLET_ID
);
}
// Do not change status bar to orange if we are just running without debug.
...
...
@@ -691,17 +689,17 @@ export class DebugService implements debug.IDebugService {
sourceMaps
:
configuration
.
sourceMaps
,
outDir
:
configuration
.
outDir
,
debugServer
:
configuration
.
debugServer
}
,
false
);
});
}
public
restartSession
():
TPromise
<
any
>
{
return
this
.
session
?
this
.
session
.
disconnect
(
true
).
then
(()
=>
new
TPromise
<
void
>
((
c
,
e
)
=>
{
setTimeout
(()
=>
{
this
.
createSession
(
false
,
null
,
false
).
then
(()
=>
c
(
null
),
err
=>
e
(
err
));
this
.
createSession
(
false
,
null
).
then
(()
=>
c
(
null
),
err
=>
e
(
err
));
},
300
);
})
)
:
this
.
createSession
(
false
,
null
,
false
);
)
:
this
.
createSession
(
false
,
null
);
}
public
getActiveSession
():
debug
.
IRawDebugSession
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录