Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
a3ade145
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,发现更多精彩内容 >>
提交
a3ade145
编写于
11月 27, 2019
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debugUx context
#84677
上级
c5f9f701
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
18 deletion
+18
-18
src/vs/workbench/contrib/debug/browser/debug.contribution.ts
src/vs/workbench/contrib/debug/browser/debug.contribution.ts
+7
-7
src/vs/workbench/contrib/debug/browser/debugService.ts
src/vs/workbench/contrib/debug/browser/debugService.ts
+6
-6
src/vs/workbench/contrib/debug/browser/debugViewlet.ts
src/vs/workbench/contrib/debug/browser/debugViewlet.ts
+3
-3
src/vs/workbench/contrib/debug/common/debug.ts
src/vs/workbench/contrib/debug/common/debug.ts
+2
-2
未找到文件。
src/vs/workbench/contrib/debug/browser/debug.contribution.ts
浏览文件 @
a3ade145
...
...
@@ -20,7 +20,7 @@ import { CallStackView } from 'vs/workbench/contrib/debug/browser/callStackView'
import
{
Extensions
as
WorkbenchExtensions
,
IWorkbenchContributionsRegistry
}
from
'
vs/workbench/common/contributions
'
;
import
{
IDebugService
,
VIEWLET_ID
,
REPL_ID
,
CONTEXT_IN_DEBUG_MODE
,
INTERNAL_CONSOLE_OPTIONS_SCHEMA
,
CONTEXT_DEBUG_STATE
,
VARIABLES_VIEW_ID
,
CALLSTACK_VIEW_ID
,
WATCH_VIEW_ID
,
BREAKPOINTS_VIEW_ID
,
VIEW_CONTAINER
,
LOADED_SCRIPTS_VIEW_ID
,
CONTEXT_LOADED_SCRIPTS_SUPPORTED
,
CONTEXT_FOCUSED_SESSION_IS_ATTACH
,
CONTEXT_STEP_BACK_SUPPORTED
,
CONTEXT_CALLSTACK_ITEM_TYPE
,
CONTEXT_RESTART_FRAME_SUPPORTED
,
CONTEXT_JUMP_TO_CURSOR_SUPPORTED
,
CONTEXT_DEBUG_
CONFIGURED
,
CONTEXT_DEBUG_STATE
,
VARIABLES_VIEW_ID
,
CALLSTACK_VIEW_ID
,
WATCH_VIEW_ID
,
BREAKPOINTS_VIEW_ID
,
VIEW_CONTAINER
,
LOADED_SCRIPTS_VIEW_ID
,
CONTEXT_LOADED_SCRIPTS_SUPPORTED
,
CONTEXT_FOCUSED_SESSION_IS_ATTACH
,
CONTEXT_STEP_BACK_SUPPORTED
,
CONTEXT_CALLSTACK_ITEM_TYPE
,
CONTEXT_RESTART_FRAME_SUPPORTED
,
CONTEXT_JUMP_TO_CURSOR_SUPPORTED
,
CONTEXT_DEBUG_
UX
,
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
IWorkbenchLayoutService
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
...
...
@@ -107,12 +107,12 @@ Registry.as<PanelRegistry>(PanelExtensions.Panels).registerPanel(PanelDescriptor
// Register default debug views
const
viewsRegistry
=
Registry
.
as
<
IViewsRegistry
>
(
ViewExtensions
.
ViewsRegistry
);
viewsRegistry
.
registerViews
([{
id
:
VARIABLES_VIEW_ID
,
name
:
nls
.
localize
(
'
variables
'
,
"
Variables
"
),
ctorDescriptor
:
{
ctor
:
VariablesView
},
order
:
10
,
weight
:
40
,
canToggleVisibility
:
true
,
focusCommand
:
{
id
:
'
workbench.debug.action.focusVariablesView
'
},
when
:
CONTEXT_DEBUG_
CONFIGURED
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
WATCH_VIEW_ID
,
name
:
nls
.
localize
(
'
watch
'
,
"
Watch
"
),
ctorDescriptor
:
{
ctor
:
WatchExpressionsView
},
order
:
20
,
weight
:
10
,
canToggleVisibility
:
true
,
focusCommand
:
{
id
:
'
workbench.debug.action.focusWatchView
'
},
when
:
CONTEXT_DEBUG_
CONFIGURED
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
CALLSTACK_VIEW_ID
,
name
:
nls
.
localize
(
'
callStack
'
,
"
Call Stack
"
),
ctorDescriptor
:
{
ctor
:
CallStackView
},
order
:
30
,
weight
:
30
,
canToggleVisibility
:
true
,
focusCommand
:
{
id
:
'
workbench.debug.action.focusCallStackView
'
},
when
:
CONTEXT_DEBUG_
CONFIGURED
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
BREAKPOINTS_VIEW_ID
,
name
:
nls
.
localize
(
'
breakpoints
'
,
"
Breakpoints
"
),
ctorDescriptor
:
{
ctor
:
BreakpointsView
},
order
:
40
,
weight
:
20
,
canToggleVisibility
:
true
,
focusCommand
:
{
id
:
'
workbench.debug.action.focusBreakpointsView
'
},
when
:
CONTEXT_DEBUG_
CONFIGURED
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
StartView
.
ID
,
name
:
StartView
.
LABEL
,
ctorDescriptor
:
{
ctor
:
StartView
},
order
:
10
,
weight
:
40
,
canToggleVisibility
:
true
,
when
:
CONTEXT_DEBUG_
CONFIGURED
.
toNegated
(
)
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
LOADED_SCRIPTS_VIEW_ID
,
name
:
nls
.
localize
(
'
loadedScripts
'
,
"
Loaded Scripts
"
),
ctorDescriptor
:
{
ctor
:
LoadedScriptsView
},
order
:
35
,
weight
:
5
,
canToggleVisibility
:
true
,
collapsed
:
true
,
when
:
ContextKeyExpr
.
and
(
CONTEXT_LOADED_SCRIPTS_SUPPORTED
,
CONTEXT_DEBUG_
CONFIGURED
)
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
VARIABLES_VIEW_ID
,
name
:
nls
.
localize
(
'
variables
'
,
"
Variables
"
),
ctorDescriptor
:
{
ctor
:
VariablesView
},
order
:
10
,
weight
:
40
,
canToggleVisibility
:
true
,
focusCommand
:
{
id
:
'
workbench.debug.action.focusVariablesView
'
},
when
:
CONTEXT_DEBUG_
UX
.
isEqualTo
(
'
default
'
)
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
WATCH_VIEW_ID
,
name
:
nls
.
localize
(
'
watch
'
,
"
Watch
"
),
ctorDescriptor
:
{
ctor
:
WatchExpressionsView
},
order
:
20
,
weight
:
10
,
canToggleVisibility
:
true
,
focusCommand
:
{
id
:
'
workbench.debug.action.focusWatchView
'
},
when
:
CONTEXT_DEBUG_
UX
.
isEqualTo
(
'
default
'
)
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
CALLSTACK_VIEW_ID
,
name
:
nls
.
localize
(
'
callStack
'
,
"
Call Stack
"
),
ctorDescriptor
:
{
ctor
:
CallStackView
},
order
:
30
,
weight
:
30
,
canToggleVisibility
:
true
,
focusCommand
:
{
id
:
'
workbench.debug.action.focusCallStackView
'
},
when
:
CONTEXT_DEBUG_
UX
.
isEqualTo
(
'
default
'
)
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
BREAKPOINTS_VIEW_ID
,
name
:
nls
.
localize
(
'
breakpoints
'
,
"
Breakpoints
"
),
ctorDescriptor
:
{
ctor
:
BreakpointsView
},
order
:
40
,
weight
:
20
,
canToggleVisibility
:
true
,
focusCommand
:
{
id
:
'
workbench.debug.action.focusBreakpointsView
'
},
when
:
CONTEXT_DEBUG_
UX
.
isEqualTo
(
'
default
'
)
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
StartView
.
ID
,
name
:
StartView
.
LABEL
,
ctorDescriptor
:
{
ctor
:
StartView
},
order
:
10
,
weight
:
40
,
canToggleVisibility
:
true
,
when
:
CONTEXT_DEBUG_
UX
.
isEqualTo
(
'
simple
'
)
}],
VIEW_CONTAINER
);
viewsRegistry
.
registerViews
([{
id
:
LOADED_SCRIPTS_VIEW_ID
,
name
:
nls
.
localize
(
'
loadedScripts
'
,
"
Loaded Scripts
"
),
ctorDescriptor
:
{
ctor
:
LoadedScriptsView
},
order
:
35
,
weight
:
5
,
canToggleVisibility
:
true
,
collapsed
:
true
,
when
:
ContextKeyExpr
.
and
(
CONTEXT_LOADED_SCRIPTS_SUPPORTED
,
CONTEXT_DEBUG_
UX
.
isEqualTo
(
'
default
'
)
)
}],
VIEW_CONTAINER
);
registerCommands
();
...
...
src/vs/workbench/contrib/debug/browser/debugService.ts
浏览文件 @
a3ade145
...
...
@@ -40,7 +40,7 @@ import { IAction } from 'vs/base/common/actions';
import
{
deepClone
,
equals
}
from
'
vs/base/common/objects
'
;
import
{
DebugSession
}
from
'
vs/workbench/contrib/debug/browser/debugSession
'
;
import
{
dispose
,
IDisposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IDebugService
,
State
,
IDebugSession
,
CONTEXT_DEBUG_TYPE
,
CONTEXT_DEBUG_STATE
,
CONTEXT_IN_DEBUG_MODE
,
IThread
,
IDebugConfiguration
,
VIEWLET_ID
,
REPL_ID
,
IConfig
,
ILaunch
,
IViewModel
,
IConfigurationManager
,
IDebugModel
,
IEnablement
,
IBreakpoint
,
IBreakpointData
,
ICompound
,
IGlobalConfig
,
IStackFrame
,
AdapterEndEvent
,
getStateLabel
,
IDebugSessionOptions
,
CONTEXT_DEBUG_
CONFIGURED
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
IDebugService
,
State
,
IDebugSession
,
CONTEXT_DEBUG_TYPE
,
CONTEXT_DEBUG_STATE
,
CONTEXT_IN_DEBUG_MODE
,
IThread
,
IDebugConfiguration
,
VIEWLET_ID
,
REPL_ID
,
IConfig
,
ILaunch
,
IViewModel
,
IConfigurationManager
,
IDebugModel
,
IEnablement
,
IBreakpoint
,
IBreakpointData
,
ICompound
,
IGlobalConfig
,
IStackFrame
,
AdapterEndEvent
,
getStateLabel
,
IDebugSessionOptions
,
CONTEXT_DEBUG_
UX
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
isExtensionHostDebugging
}
from
'
vs/workbench/contrib/debug/common/debugUtils
'
;
import
{
isErrorWithActions
,
createErrorWithActions
}
from
'
vs/base/common/errorsWithActions
'
;
import
{
RunOnceScheduler
}
from
'
vs/base/common/async
'
;
...
...
@@ -86,7 +86,7 @@ export class DebugService implements IDebugService {
private
debugType
:
IContextKey
<
string
>
;
private
debugState
:
IContextKey
<
string
>
;
private
inDebugMode
:
IContextKey
<
boolean
>
;
private
debug
Configured
:
IContextKey
<
boolean
>
;
private
debug
Ux
:
IContextKey
<
string
>
;
private
breakpointsToSendOnResourceSaved
:
Set
<
string
>
;
private
initializing
=
false
;
private
previousState
:
State
|
undefined
;
...
...
@@ -128,8 +128,8 @@ export class DebugService implements IDebugService {
this
.
debugType
=
CONTEXT_DEBUG_TYPE
.
bindTo
(
contextKeyService
);
this
.
debugState
=
CONTEXT_DEBUG_STATE
.
bindTo
(
contextKeyService
);
this
.
inDebugMode
=
CONTEXT_IN_DEBUG_MODE
.
bindTo
(
contextKeyService
);
this
.
debug
Configured
=
CONTEXT_DEBUG_CONFIGURED
.
bindTo
(
contextKeyService
);
this
.
debug
Configured
.
set
(
!!
this
.
configurationManager
.
selectedConfiguration
.
name
);
this
.
debug
Ux
=
CONTEXT_DEBUG_UX
.
bindTo
(
contextKeyService
);
this
.
debug
Ux
.
set
(
!!
this
.
configurationManager
.
selectedConfiguration
.
name
?
'
default
'
:
'
simple
'
);
this
.
model
=
new
DebugModel
(
this
.
loadBreakpoints
(),
this
.
loadFunctionBreakpoints
(),
this
.
loadExceptionBreakpoints
(),
this
.
loadDataBreakpoints
(),
this
.
loadWatchExpressions
(),
this
.
textFileService
);
...
...
@@ -174,7 +174,7 @@ export class DebugService implements IDebugService {
this
.
onStateChange
();
}));
this
.
toDispose
.
push
(
this
.
configurationManager
.
onDidSelectConfiguration
(()
=>
{
this
.
debug
Configured
.
set
(
!!
(
this
.
state
!==
State
.
Inactive
||
this
.
configurationManager
.
selectedConfiguration
.
name
)
);
this
.
debug
Ux
.
set
(
!!
(
this
.
state
!==
State
.
Inactive
||
this
.
configurationManager
.
selectedConfiguration
.
name
)
?
'
default
'
:
'
simple
'
);
}));
}
...
...
@@ -232,7 +232,7 @@ export class DebugService implements IDebugService {
if
(
this
.
previousState
!==
state
)
{
this
.
debugState
.
set
(
getStateLabel
(
state
));
this
.
inDebugMode
.
set
(
state
!==
State
.
Inactive
);
this
.
debug
Configured
.
set
(
!!
(
state
!==
State
.
Inactive
||
this
.
configurationManager
.
selectedConfiguration
.
name
)
);
this
.
debug
Ux
.
set
(
!!
(
state
!==
State
.
Inactive
||
this
.
configurationManager
.
selectedConfiguration
.
name
)
?
'
default
'
:
'
simple
'
);
this
.
previousState
=
state
;
this
.
_onDidChangeState
.
fire
(
state
);
}
...
...
src/vs/workbench/contrib/debug/browser/debugViewlet.ts
浏览文件 @
a3ade145
...
...
@@ -9,7 +9,7 @@ import { IAction } from 'vs/base/common/actions';
import
*
as
DOM
from
'
vs/base/browser/dom
'
;
import
{
IActionViewItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
ViewContainerViewlet
}
from
'
vs/workbench/browser/parts/views/viewsViewlet
'
;
import
{
IDebugService
,
VIEWLET_ID
,
State
,
BREAKPOINTS_VIEW_ID
,
IDebugConfiguration
,
REPL_ID
,
CONTEXT_DEBUG_
CONFIGURED
,
CONTEXT_DEUBG_CONFIGURED
_KEY
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
IDebugService
,
VIEWLET_ID
,
State
,
BREAKPOINTS_VIEW_ID
,
IDebugConfiguration
,
REPL_ID
,
CONTEXT_DEBUG_
UX
,
CONTEXT_DEBUG_UX
_KEY
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
StartAction
,
ConfigureAction
,
SelectAndStartAction
,
FocusSessionAction
}
from
'
vs/workbench/contrib/debug/browser/debugActions
'
;
import
{
StartDebugActionViewItem
,
FocusSessionActionViewItem
}
from
'
vs/workbench/contrib/debug/browser/debugActionViewItems
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -67,7 +67,7 @@ export class DebugViewlet extends ViewContainerViewlet {
this
.
_register
(
this
.
debugService
.
onDidChangeState
(
state
=>
this
.
onDebugServiceStateChange
(
state
)));
this
.
_register
(
this
.
debugService
.
onDidNewSession
(()
=>
this
.
updateToolBar
()));
this
.
_register
(
this
.
contextKeyService
.
onDidChangeContext
(
e
=>
{
if
(
e
.
affectsSome
(
new
Set
(
CONTEXT_DE
UBG_CONFIGURED
_KEY
)))
{
if
(
e
.
affectsSome
(
new
Set
(
CONTEXT_DE
BUG_UX
_KEY
)))
{
this
.
updateTitleArea
();
}
}));
...
...
@@ -116,7 +116,7 @@ export class DebugViewlet extends ViewContainerViewlet {
}
getActions
():
IAction
[]
{
if
(
!
CONTEXT_DEBUG_CONFIGURED
.
getValue
(
this
.
contextKeyService
)
)
{
if
(
CONTEXT_DEBUG_UX
.
getValue
(
this
.
contextKeyService
)
===
'
simple
'
)
{
return
[];
}
if
(
this
.
showInitialDebugActions
)
{
...
...
src/vs/workbench/contrib/debug/common/debug.ts
浏览文件 @
a3ade145
...
...
@@ -40,8 +40,8 @@ export const DEBUG_SERVICE_ID = 'debugService';
export
const
CONTEXT_DEBUG_TYPE
=
new
RawContextKey
<
string
>
(
'
debugType
'
,
undefined
);
export
const
CONTEXT_DEBUG_CONFIGURATION_TYPE
=
new
RawContextKey
<
string
>
(
'
debugConfigurationType
'
,
undefined
);
export
const
CONTEXT_DEBUG_STATE
=
new
RawContextKey
<
string
>
(
'
debugState
'
,
'
inactive
'
);
export
const
CONTEXT_DE
UBG_CONFIGURED_KEY
=
'
debugConfigured
'
;
export
const
CONTEXT_DEBUG_
CONFIGURED
=
new
RawContextKey
<
boolean
>
(
CONTEXT_DEUBG_CONFIGURED_KEY
,
false
);
export
const
CONTEXT_DE
BUG_UX_KEY
=
'
debugUx
'
;
export
const
CONTEXT_DEBUG_
UX
=
new
RawContextKey
<
string
>
(
CONTEXT_DEBUG_UX_KEY
,
'
default
'
);
export
const
CONTEXT_IN_DEBUG_MODE
=
new
RawContextKey
<
boolean
>
(
'
inDebugMode
'
,
false
);
export
const
CONTEXT_IN_DEBUG_REPL
=
new
RawContextKey
<
boolean
>
(
'
inDebugRepl
'
,
false
);
export
const
CONTEXT_BREAKPOINT_WIDGET_VISIBLE
=
new
RawContextKey
<
boolean
>
(
'
breakpointWidgetVisible
'
,
false
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录