Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
959669be
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,发现更多精彩内容 >>
提交
959669be
编写于
12月 27, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup debug commands used by process explorer
上级
f855e045
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
11 addition
and
41 deletion
+11
-41
src/vs/code/electron-browser/processExplorer/processExplorerMain.ts
...e/electron-browser/processExplorer/processExplorerMain.ts
+2
-2
src/vs/workbench/parts/debug/browser/debugActions.ts
src/vs/workbench/parts/debug/browser/debugActions.ts
+2
-6
src/vs/workbench/parts/debug/browser/debugCommands.ts
src/vs/workbench/parts/debug/browser/debugCommands.ts
+6
-33
src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
...kbench/parts/debug/electron-browser/debug.contribution.ts
+1
-0
未找到文件。
src/vs/code/electron-browser/processExplorer/processExplorerMain.ts
浏览文件 @
959669be
...
...
@@ -96,7 +96,7 @@ function attachTo(item: ProcessItem) {
config
.
port
=
parseInt
(
matches
[
2
]);
}
ipcRenderer
.
send
(
'
vscode:workbenchCommand
'
,
{
id
:
'
workbench.action.debug.start
'
,
from
:
'
processExplorer
'
,
args
:
[
config
]
});
ipcRenderer
.
send
(
'
vscode:workbenchCommand
'
,
{
id
:
'
debug.startFromConfig
'
,
from
:
'
processExplorer
'
,
args
:
[
config
]
});
}
function
getProcessIdWithHighestProperty
(
processList
,
propertyName
:
string
)
{
...
...
src/vs/workbench/parts/debug/browser/debugActions.ts
浏览文件 @
959669be
...
...
@@ -10,7 +10,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
IWorkspaceContextService
,
WorkbenchState
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
import
{
IDebugService
,
State
,
IDebugSession
,
IThread
,
IEnablement
,
IBreakpoint
,
IStackFrame
,
REPL_ID
,
IConfig
}
import
{
IDebugService
,
State
,
IDebugSession
,
IThread
,
IEnablement
,
IBreakpoint
,
IStackFrame
,
REPL_ID
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
Variable
,
Expression
,
Thread
,
Breakpoint
}
from
'
vs/workbench/parts/debug/common/debugModel
'
;
import
{
IPartService
}
from
'
vs/workbench/services/part/common/partService
'
;
...
...
@@ -135,11 +135,7 @@ export class StartAction extends AbstractDebugAction {
// Note: When this action is executed from the process explorer, a config is passed. For all
// other cases it is run with no arguments.
public
run
(
config
?:
IConfig
):
Promise
<
any
>
{
if
(
config
&&
'
type
'
in
config
&&
'
request
'
in
config
)
{
return
this
.
debugService
.
startDebugging
(
undefined
,
config
,
this
.
isNoDebug
());
}
public
run
():
Promise
<
any
>
{
const
configurationManager
=
this
.
debugService
.
getConfigurationManager
();
let
launch
=
configurationManager
.
selectedConfiguration
.
launch
;
if
(
!
launch
||
launch
.
getConfigurationNames
().
length
===
0
)
{
...
...
src/vs/workbench/parts/debug/browser/debugCommands.ts
浏览文件 @
959669be
...
...
@@ -23,42 +23,21 @@ import { INotificationService } from 'vs/platform/notification/common/notificati
import
{
InputFocusedContext
}
from
'
vs/platform/workbench/common/contextkeys
'
;
import
{
ServicesAccessor
}
from
'
vs/editor/browser/editorExtensions
'
;
import
{
PanelFocusContext
}
from
'
vs/workbench/browser/parts/panel/panelPart
'
;
import
{
StartAction
}
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IHistoryService
}
from
'
vs/workbench/services/history/common/history
'
;
import
{
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
onUnexpectedError
}
from
'
vs/base/common/errors
'
;
export
const
ADD_CONFIGURATION_ID
=
'
debug.addConfiguration
'
;
export
const
TOGGLE_INLINE_BREAKPOINT_ID
=
'
editor.debug.action.toggleInlineBreakpoint
'
;
export
function
registerCommands
():
void
{
KeybindingsRegistry
.
registerCommandAndKeybindingRule
({
id
:
StartAction
.
ID
,
weight
:
KeybindingWeight
.
WorkbenchContrib
,
when
:
CONTEXT_IN_DEBUG_MODE
.
toNegated
(),
primary
:
KeyCode
.
F5
,
handler
:
(
accessor
,
config
?:
IConfig
)
=>
{
const
notificationService
=
accessor
.
get
(
INotificationService
);
const
keybindingService
=
accessor
.
get
(
IKeybindingService
);
CommandsRegistry
.
registerCommand
({
id
:
'
debug.startFromConfig
'
,
handler
:
(
accessor
,
config
:
IConfig
)
=>
{
const
debugService
=
accessor
.
get
(
IDebugService
);
const
contextService
=
accessor
.
get
(
IWorkspaceContextService
);
const
historyService
=
accessor
.
get
(
IHistoryService
);
const
startAction
=
new
StartAction
(
StartAction
.
ID
,
StartAction
.
LABEL
,
debugService
,
keybindingService
,
contextService
,
historyService
);
if
(
!
startAction
.
enabled
)
{
startAction
.
dispose
();
return
undefined
;
debugService
.
startDebugging
(
undefined
,
config
).
then
(
undefined
,
onUnexpectedError
);
}
startAction
.
run
(
config
).
then
(
_
=>
{
startAction
.
dispose
();
},
err
=>
{
startAction
.
dispose
();
notificationService
.
error
(
err
);
});
}
});
KeybindingsRegistry
.
registerCommandAndKeybindingRule
({
id
:
'
debug.toggleBreakpoint
'
,
...
...
@@ -257,12 +236,6 @@ export function registerCommands(): void {
handler
:
inlineBreakpointHandler
});
MenuRegistry
.
addCommand
({
id
:
StartAction
.
ID
,
title
:
StartAction
.
LABEL
,
category
:
nls
.
localize
(
'
debug
'
,
"
Debug
"
)
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
CommandPalette
,
{
command
:
{
id
:
TOGGLE_INLINE_BREAKPOINT_ID
,
...
...
src/vs/workbench/parts/debug/electron-browser/debug.contribution.ts
浏览文件 @
959669be
...
...
@@ -130,6 +130,7 @@ Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).regi
const
debugCategory
=
nls
.
localize
(
'
debugCategory
'
,
"
Debug
"
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StartAction
,
StartAction
.
ID
,
StartAction
.
LABEL
,
{
primary
:
KeyCode
.
F5
}),
'
Debug: Start Debugging
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StepOverAction
,
StepOverAction
.
ID
,
StepOverAction
.
LABEL
,
{
primary
:
KeyCode
.
F10
},
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Step Over
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StepIntoAction
,
StepIntoAction
.
ID
,
StepIntoAction
.
LABEL
,
{
primary
:
KeyCode
.
F11
},
CONTEXT_IN_DEBUG_MODE
,
KeybindingWeight
.
WorkbenchContrib
+
1
),
'
Debug: Step Into
'
,
debugCategory
);
registry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
StepOutAction
,
StepOutAction
.
ID
,
StepOutAction
.
LABEL
,
{
primary
:
KeyMod
.
Shift
|
KeyCode
.
F11
},
CONTEXT_IN_DEBUG_MODE
),
'
Debug: Step Out
'
,
debugCategory
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录