Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5f8d991f
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,发现更多精彩内容 >>
提交
5f8d991f
编写于
12月 28, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug: offer 'More...' when picking debug adapter
#16171
上级
512ca3ab
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
17 deletion
+32
-17
src/vs/workbench/parts/debug/browser/debugActionItems.ts
src/vs/workbench/parts/debug/browser/debugActionItems.ts
+3
-2
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+4
-10
src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts
...parts/debug/electron-browser/debugConfigurationManager.ts
+24
-4
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+1
-1
未找到文件。
src/vs/workbench/parts/debug/browser/debugActionItems.ts
浏览文件 @
5f8d991f
...
...
@@ -3,6 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
*
as
nls
from
'
vs/nls
'
;
import
*
as
lifecycle
from
'
vs/base/common/lifecycle
'
;
import
*
as
errors
from
'
vs/base/common/errors
'
;
import
{
IAction
,
IActionRunner
}
from
'
vs/base/common/actions
'
;
...
...
@@ -13,7 +14,7 @@ import { SelectBox } from 'vs/base/browser/ui/selectBox/selectBox';
import
{
SelectActionItem
,
IActionItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
EventEmitter
}
from
'
vs/base/common/eventEmitter
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IDebugService
,
NO_CONFIGURATIONS_LABEL
}
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
IDebugService
}
from
'
vs/workbench/parts/debug/common/debug
'
;
const
$
=
dom
.
$
;
...
...
@@ -106,7 +107,7 @@ export class StartDebugActionItem extends EventEmitter implements IActionItem {
private
setEnabled
(
enabled
:
boolean
):
void
{
this
.
selectBox
.
enabled
=
enabled
;
if
(
!
enabled
)
{
this
.
selectBox
.
setOptions
([
NO_CONFIGURATIONS_LABEL
],
0
);
this
.
selectBox
.
setOptions
([
nls
.
localize
(
'
noConfigurations
'
,
"
No Configurations
"
)
],
0
);
}
}
...
...
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
5f8d991f
...
...
@@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import
*
as
nls
from
'
vs/nls
'
;
import
uri
from
'
vs/base/common/uri
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
Event
from
'
vs/base/common/event
'
;
...
...
@@ -29,7 +28,6 @@ export const CONTEXT_BREAKPOINT_WIDGET_VISIBLE = new RawContextKey<boolean>('bre
export
const
EDITOR_CONTRIBUTION_ID
=
'
editor.contrib.debug
'
;
export
const
DEBUG_SCHEME
=
'
debug
'
;
export
const
NO_CONFIGURATIONS_LABEL
=
nls
.
localize
(
'
noConfigurations
'
,
"
No Configurations
"
);
// raw
...
...
@@ -260,7 +258,7 @@ export interface IModel extends ITreeElement {
onDidChangeReplElements
:
Event
<
void
>
;
};
//
service
enums
//
Debug
enums
export
enum
State
{
Disabled
,
...
...
@@ -271,15 +269,13 @@ export enum State {
RunningNoDebug
}
//
Service config
//
Debug configuration interfaces
export
interface
IDebugConfiguration
{
allowBreakpointsEverywhere
:
boolean
;
openExplorerOnEnd
:
boolean
;
}
// service interfaces
export
interface
IGlobalConfig
{
version
:
string
;
compounds
:
ICompound
[];
...
...
@@ -331,10 +327,6 @@ export interface IRawAdapter extends IRawEnvAdapter {
linux
?:
IRawEnvAdapter
;
}
export
interface
IRawBreakpointContribution
{
language
:
string
;
}
export
interface
IConfigurationManager
{
/**
...
...
@@ -366,6 +358,8 @@ export interface IConfigurationManager {
canSetBreakpointsIn
(
model
:
EditorIModel
):
boolean
;
}
// Debug service interfaces
export
const
IDebugService
=
createDecorator
<
IDebugService
>
(
DEBUG_SERVICE_ID
);
export
interface
IDebugService
{
...
...
src/vs/workbench/parts/debug/
node
/debugConfigurationManager.ts
→
src/vs/workbench/parts/debug/
electron-browser
/debugConfigurationManager.ts
浏览文件 @
5f8d991f
...
...
@@ -22,6 +22,8 @@ import { IFileService } from 'vs/platform/files/common/files';
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IWorkspaceContextService
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IExtensionsViewlet
,
VIEWLET_ID
as
EXTENSIONS_VIEWLET_ID
}
from
'
vs/workbench/parts/extensions/common/extensions
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/browser/viewlet
'
;
import
*
as
debug
from
'
vs/workbench/parts/debug/common/debug
'
;
import
{
Adapter
}
from
'
vs/workbench/parts/debug/node/debugAdapter
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
...
...
@@ -111,8 +113,12 @@ export const debuggersExtPoint = extensionsRegistry.ExtensionsRegistry.registerE
}
});
interface
IRawBreakpointContribution
{
language
:
string
;
}
// breakpoints extension point #9037
export
const
breakpointsExtPoint
=
extensionsRegistry
.
ExtensionsRegistry
.
registerExtensionPoint
<
debug
.
IRawBreakpointContribution
[]
>
(
'
breakpoints
'
,
[],
{
const
breakpointsExtPoint
=
extensionsRegistry
.
ExtensionsRegistry
.
registerExtensionPoint
<
IRawBreakpointContribution
[]
>
(
'
breakpoints
'
,
[],
{
description
:
nls
.
localize
(
'
vscode.extension.contributes.breakpoints
'
,
'
Contributes breakpoints.
'
),
type
:
'
array
'
,
defaultSnippets
:
[{
body
:
[{
language
:
''
}]
}],
...
...
@@ -197,7 +203,8 @@ export class ConfigurationManager implements debug.IConfigurationManager {
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
@
IQuickOpenService
private
quickOpenService
:
IQuickOpenService
,
@
IConfigurationResolverService
private
configurationResolverService
:
IConfigurationResolverService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IViewletService
private
viewletService
:
IViewletService
)
{
this
.
adapters
=
[];
this
.
registerListeners
();
...
...
@@ -326,8 +333,21 @@ export class ConfigurationManager implements debug.IConfigurationManager {
let
configFileCreated
=
false
;
return
this
.
fileService
.
resolveContent
(
resource
).
then
(
content
=>
true
,
err
=>
this
.
quickOpenService
.
pick
(
this
.
adapters
,
{
placeHolder
:
nls
.
localize
(
'
selectDebug
'
,
"
Select Environment
"
)
})
.
then
(
adapter
=>
adapter
?
adapter
.
getInitialConfigurationContent
()
:
null
)
this
.
quickOpenService
.
pick
([...
this
.
adapters
,
{
label
:
'
More...
'
}],
{
placeHolder
:
nls
.
localize
(
'
selectDebug
'
,
"
Select Environment
"
)
})
.
then
(
picked
=>
{
if
(
picked
instanceof
Adapter
)
{
return
picked
?
picked
.
getInitialConfigurationContent
()
:
null
;
}
if
(
picked
)
{
return
this
.
viewletService
.
openViewlet
(
EXTENSIONS_VIEWLET_ID
,
true
)
.
then
(
viewlet
=>
viewlet
as
IExtensionsViewlet
)
.
then
(
viewlet
=>
{
viewlet
.
search
(
'
tag:debuggers
'
);
viewlet
.
focus
();
return
null
;
});
}
})
.
then
(
content
=>
{
if
(
!
content
)
{
return
false
;
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
5f8d991f
...
...
@@ -34,7 +34,7 @@ import { RawDebugSession } from 'vs/workbench/parts/debug/electron-browser/rawDe
import
{
Model
,
ExceptionBreakpoint
,
FunctionBreakpoint
,
Breakpoint
,
Expression
,
OutputNameValueElement
,
ExpressionContainer
,
Process
}
from
'
vs/workbench/parts/debug/common/debugModel
'
;
import
{
ViewModel
}
from
'
vs/workbench/parts/debug/common/debugViewModel
'
;
import
*
as
debugactions
from
'
vs/workbench/parts/debug/browser/debugActions
'
;
import
{
ConfigurationManager
}
from
'
vs/workbench/parts/debug/
node
/debugConfigurationManager
'
;
import
{
ConfigurationManager
}
from
'
vs/workbench/parts/debug/
electron-browser
/debugConfigurationManager
'
;
import
{
ToggleMarkersPanelAction
}
from
'
vs/workbench/parts/markers/browser/markersPanelActions
'
;
import
{
ITaskService
,
TaskEvent
,
TaskType
,
TaskServiceEvents
,
ITaskSummary
}
from
'
vs/workbench/parts/tasks/common/taskService
'
;
import
{
TaskError
,
TaskErrors
}
from
'
vs/workbench/parts/tasks/common/taskSystem
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录