Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
536d7831
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,发现更多精彩内容 >>
提交
536d7831
编写于
11月 10, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: surface reverse continue action
fixes #13705
上级
ffb70920
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
59 addition
and
33 deletion
+59
-33
src/vs/workbench/parts/debug/browser/debugActions.ts
src/vs/workbench/parts/debug/browser/debugActions.ts
+47
-23
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
+5
-1
src/vs/workbench/parts/debug/browser/media/debug.contribution.css
...orkbench/parts/debug/browser/media/debug.contribution.css
+6
-7
src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
...kbench/parts/debug/electron-browser/debug.contribution.ts
+1
-2
未找到文件。
src/vs/workbench/parts/debug/browser/debugActions.ts
浏览文件 @
536d7831
...
@@ -220,29 +220,6 @@ export class StepOutAction extends AbstractDebugAction {
...
@@ -220,29 +220,6 @@ export class StepOutAction extends AbstractDebugAction {
}
}
}
}
export
class
StepBackAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.stepBack
'
;
static
LABEL
=
nls
.
localize
(
'
stepBackDebug
'
,
"
Step Back
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
super
(
id
,
label
,
'
debug-action step-back
'
,
debugService
,
keybindingService
,
50
);
}
public
run
(
thread
:
debug
.
IThread
):
TPromise
<
any
>
{
if
(
!
(
thread
instanceof
Thread
))
{
thread
=
this
.
debugService
.
getViewModel
().
focusedThread
;
}
return
thread
.
stepBack
();
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
const
process
=
this
.
debugService
.
getViewModel
().
focusedProcess
;
return
super
.
isEnabled
(
state
)
&&
state
===
debug
.
State
.
Stopped
&&
process
&&
process
.
session
.
configuration
.
capabilities
.
supportsStepBack
;
}
}
export
class
StopAction
extends
AbstractDebugAction
{
export
class
StopAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.stop
'
;
static
ID
=
'
workbench.action.debug.stop
'
;
static
LABEL
=
nls
.
localize
(
'
stopDebug
'
,
"
Stop
"
);
static
LABEL
=
nls
.
localize
(
'
stopDebug
'
,
"
Stop
"
);
...
@@ -755,3 +732,50 @@ export class FocusProcessAction extends AbstractDebugAction {
...
@@ -755,3 +732,50 @@ export class FocusProcessAction extends AbstractDebugAction {
});
});
}
}
}
}
// Actions used by the chakra debugger
export
class
StepBackAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.stepBack
'
;
static
LABEL
=
nls
.
localize
(
'
stepBackDebug
'
,
"
Step Back
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
super
(
id
,
label
,
'
debug-action step-back
'
,
debugService
,
keybindingService
,
50
);
}
public
run
(
thread
:
debug
.
IThread
):
TPromise
<
any
>
{
if
(
!
(
thread
instanceof
Thread
))
{
thread
=
this
.
debugService
.
getViewModel
().
focusedThread
;
}
return
thread
?
thread
.
stepBack
()
:
TPromise
.
as
(
null
);
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
const
process
=
this
.
debugService
.
getViewModel
().
focusedProcess
;
return
super
.
isEnabled
(
state
)
&&
state
===
debug
.
State
.
Stopped
&&
process
&&
process
.
session
.
configuration
.
capabilities
.
supportsStepBack
;
}
}
export
class
ReverseContinueAction
extends
AbstractDebugAction
{
static
ID
=
'
workbench.action.debug.reverseContinue
'
;
static
LABEL
=
nls
.
localize
(
'
reverseContinue
'
,
"
Reverse
"
);
constructor
(
id
:
string
,
label
:
string
,
@
IDebugService
debugService
:
IDebugService
,
@
IKeybindingService
keybindingService
:
IKeybindingService
)
{
super
(
id
,
label
,
'
debug-action reverse-continue
'
,
debugService
,
keybindingService
,
60
);
}
public
run
(
thread
:
debug
.
IThread
):
TPromise
<
any
>
{
if
(
!
(
thread
instanceof
Thread
))
{
thread
=
this
.
debugService
.
getViewModel
().
focusedThread
;
}
return
thread
?
thread
.
reverseContinue
()
:
TPromise
.
as
(
null
);
}
protected
isEnabled
(
state
:
debug
.
State
):
boolean
{
const
process
=
this
.
debugService
.
getViewModel
().
focusedProcess
;
return
super
.
isEnabled
(
state
)
&&
state
===
debug
.
State
.
Stopped
&&
process
&&
process
.
session
.
configuration
.
capabilities
.
supportsStepBack
;
}
}
src/vs/workbench/parts/debug/browser/debugActionsWidget.ts
浏览文件 @
536d7831
...
@@ -18,7 +18,7 @@ import { ActionBar, ActionsOrientation } from 'vs/base/browser/ui/actionbar/acti
...
@@ -18,7 +18,7 @@ import { ActionBar, ActionsOrientation } from 'vs/base/browser/ui/actionbar/acti
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
import
{
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
{
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
*
as
debug
from
'
vs/workbench/parts/debug/common/debug
'
;
import
*
as
debug
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
AbstractDebugAction
,
PauseAction
,
ContinueAction
,
StepBackAction
,
StopAction
,
DisconnectAction
,
StepOverAction
,
StepIntoAction
,
StepOutAction
,
RestartAction
,
FocusProcessAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
{
AbstractDebugAction
,
PauseAction
,
ContinueAction
,
StepBackAction
,
ReverseContinueAction
,
StopAction
,
DisconnectAction
,
StepOverAction
,
StepIntoAction
,
StepOutAction
,
RestartAction
,
FocusProcessAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
{
FocusProcessActionItem
}
from
'
vs/workbench/parts/debug/browser/debugActionItems
'
;
import
{
FocusProcessActionItem
}
from
'
vs/workbench/parts/debug/browser/debugActionItems
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
import
{
IStorageService
,
StorageScope
}
from
'
vs/platform/storage/common/storage
'
;
...
@@ -201,6 +201,7 @@ export class DebugActionsWidget implements IWorkbenchContribution {
...
@@ -201,6 +201,7 @@ export class DebugActionsWidget implements IWorkbenchContribution {
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
StepOutAction
,
StepOutAction
.
ID
,
StepOutAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
StepOutAction
,
StepOutAction
.
ID
,
StepOutAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
RestartAction
,
RestartAction
.
ID
,
RestartAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
RestartAction
,
RestartAction
.
ID
,
RestartAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
StepBackAction
,
StepBackAction
.
ID
,
StepBackAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
StepBackAction
,
StepBackAction
.
ID
,
StepBackAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
ReverseContinueAction
,
ReverseContinueAction
.
ID
,
ReverseContinueAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
FocusProcessAction
,
FocusProcessAction
.
ID
,
FocusProcessAction
.
LABEL
));
this
.
allActions
.
push
(
this
.
instantiationService
.
createInstance
(
FocusProcessAction
,
FocusProcessAction
.
ID
,
FocusProcessAction
.
LABEL
));
this
.
allActions
.
forEach
(
a
=>
{
this
.
allActions
.
forEach
(
a
=>
{
this
.
toDispose
.
push
(
a
);
this
.
toDispose
.
push
(
a
);
...
@@ -221,6 +222,9 @@ export class DebugActionsWidget implements IWorkbenchContribution {
...
@@ -221,6 +222,9 @@ export class DebugActionsWidget implements IWorkbenchContribution {
if
(
a
.
id
===
StepBackAction
.
ID
)
{
if
(
a
.
id
===
StepBackAction
.
ID
)
{
return
process
&&
process
.
session
.
configuration
.
capabilities
.
supportsStepBack
;
return
process
&&
process
.
session
.
configuration
.
capabilities
.
supportsStepBack
;
}
}
if
(
a
.
id
===
ReverseContinueAction
.
ID
)
{
return
process
&&
process
.
session
.
configuration
.
capabilities
.
supportsStepBack
;
}
if
(
a
.
id
===
DisconnectAction
.
ID
)
{
if
(
a
.
id
===
DisconnectAction
.
ID
)
{
return
attached
;
return
attached
;
}
}
...
...
src/vs/workbench/parts/debug/browser/media/debug.contribution.css
浏览文件 @
536d7831
...
@@ -96,11 +96,13 @@
...
@@ -96,11 +96,13 @@
background
:
url('step-out.svg')
center
center
no-repeat
;
background
:
url('step-out.svg')
center
center
no-repeat
;
}
}
.monaco-workbench
.debug-action.step-back
{
.monaco-workbench
.debug-action.step-back
,
.monaco-workbench
.debug-action.reverse-continue
{
transform
:
scaleX
(
-1
);
transform
:
scaleX
(
-1
);
}
}
.monaco-workbench
.debug-action.continue
,
.monaco-workbench
.debug-action.continue
,
.monaco-workbench
.debug-action.reverse-continue
,
.monaco-workbench
.debug-action.start
{
.monaco-workbench
.debug-action.start
{
background
:
url('continue.svg')
center
center
no-repeat
;
background
:
url('continue.svg')
center
center
no-repeat
;
}
}
...
@@ -319,15 +321,12 @@
...
@@ -319,15 +321,12 @@
background
:
url('step-out-inverse.svg')
center
center
no-repeat
;
background
:
url('step-out-inverse.svg')
center
center
no-repeat
;
}
}
.vs-dark
.monaco-workbench
.debug-action.step-back
,
.hc-black
.monaco-workbench
.debug-action.step-back
{
transform
:
scaleX
(
-1
);
}
.vs-dark
.monaco-workbench
.debug-action.continue
,
.vs-dark
.monaco-workbench
.debug-action.continue
,
.vs-dark
.monaco-workbench
.debug-action.reverse-continue
,
.vs-dark
.monaco-workbench
.debug-action.start
,
.vs-dark
.monaco-workbench
.debug-action.start
,
.hc-black
.monaco-workbench
.debug-action.continue
,
.hc-black
.monaco-workbench
.debug-action.continue
,
.hc-black
.monaco-workbench
.debug-action.start
{
.hc-black
.monaco-workbench
.debug-action.start
,
.hc-black
.monaco-workbench
.debug-action.reverse-continue
{
background
:
url('continue-inverse.svg')
center
center
no-repeat
;
background
:
url('continue-inverse.svg')
center
center
no-repeat
;
}
}
...
...
src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
浏览文件 @
536d7831
...
@@ -27,7 +27,7 @@ import { IPartService } from 'vs/workbench/services/part/common/partService';
...
@@ -27,7 +27,7 @@ import { IPartService } from 'vs/workbench/services/part/common/partService';
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
IPanelService
}
from
'
vs/workbench/services/panel/common/panelService
'
;
import
{
DebugEditorModelManager
}
from
'
vs/workbench/parts/debug/browser/debugEditorModelManager
'
;
import
{
DebugEditorModelManager
}
from
'
vs/workbench/parts/debug/browser/debugEditorModelManager
'
;
import
{
import
{
StepOverAction
,
ClearReplAction
,
FocusReplAction
,
StepIntoAction
,
StepOutAction
,
StartAction
,
StepBackAction
,
RestartAction
,
ContinueAction
,
StopAction
,
DisconnectAction
,
PauseAction
,
AddFunctionBreakpointAction
,
StepOverAction
,
ClearReplAction
,
FocusReplAction
,
StepIntoAction
,
StepOutAction
,
StartAction
,
RestartAction
,
ContinueAction
,
StopAction
,
DisconnectAction
,
PauseAction
,
AddFunctionBreakpointAction
,
ConfigureAction
,
DisableAllBreakpointsAction
,
EnableAllBreakpointsAction
,
RemoveAllBreakpointsAction
,
RunAction
,
ReapplyBreakpointsAction
ConfigureAction
,
DisableAllBreakpointsAction
,
EnableAllBreakpointsAction
,
RemoveAllBreakpointsAction
,
RunAction
,
ReapplyBreakpointsAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
debugwidget
=
require
(
'
vs/workbench/parts/debug/browser/debugActionsWidget
'
);
import
debugwidget
=
require
(
'
vs/workbench/parts/debug/browser/debugActionsWidget
'
);
...
@@ -117,7 +117,6 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(
...
@@ -117,7 +117,6 @@ registry.registerWorkbenchAction(new SyncActionDescriptor(
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StepOverAction
,
StepOverAction
.
ID
,
StepOverAction
.
LABEL
,
{
primary
:
KeyCode
.
F10
},
debug
.
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Step Over
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StepOverAction
,
StepOverAction
.
ID
,
StepOverAction
.
LABEL
,
{
primary
:
KeyCode
.
F10
},
debug
.
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Step Over
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StepIntoAction
,
StepIntoAction
.
ID
,
StepIntoAction
.
LABEL
,
{
primary
:
KeyCode
.
F11
},
debug
.
CONTEXT_IN_DEBUG_MODE
,
KeybindingsRegistry
.
WEIGHT
.
workbenchContrib
(
1
)),
'
Debug: Step Into
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StepIntoAction
,
StepIntoAction
.
ID
,
StepIntoAction
.
LABEL
,
{
primary
:
KeyCode
.
F11
},
debug
.
CONTEXT_IN_DEBUG_MODE
,
KeybindingsRegistry
.
WEIGHT
.
workbenchContrib
(
1
)),
'
Debug: Step Into
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StepOutAction
,
StepOutAction
.
ID
,
StepOutAction
.
LABEL
,
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
F11
},
debug
.
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Step Out
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StepOutAction
,
StepOutAction
.
ID
,
StepOutAction
.
LABEL
,
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
F11
},
debug
.
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Step Out
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StepBackAction
,
StepBackAction
.
ID
,
StepBackAction
.
LABEL
,
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
F10
},
debug
.
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Step Back
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
RestartAction
,
RestartAction
.
ID
,
RestartAction
.
LABEL
,
{
primary
:
KeyMod
.
Shift
|
KeyMod
.
CtrlCmd
|
KeyCode
.
F5
},
debug
.
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Restart
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
RestartAction
,
RestartAction
.
ID
,
RestartAction
.
LABEL
,
{
primary
:
KeyMod
.
Shift
|
KeyMod
.
CtrlCmd
|
KeyCode
.
F5
},
debug
.
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Restart
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StopAction
,
StopAction
.
ID
,
StopAction
.
LABEL
,
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
F5
},
debug
.
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Stop
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StopAction
,
StopAction
.
ID
,
StopAction
.
LABEL
,
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
F5
},
debug
.
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Stop
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
DisconnectAction
,
DisconnectAction
.
ID
,
DisconnectAction
.
LABEL
),
'
Debug: Disconnect
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
DisconnectAction
,
DisconnectAction
.
ID
,
DisconnectAction
.
LABEL
),
'
Debug: Disconnect
'
,
debugCategory
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录