Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
05c236fc
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
05c236fc
编写于
2月 16, 2016
作者:
S
Sofian Hnaide
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3054 from Microsoft/isidorn/debug-telemetry
debug: telemetry key contributed by debug adapters
上级
25f09d59
f08128f3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
1 deletion
+18
-1
src/vs/workbench/parts/debug/common/debug.ts
src/vs/workbench/parts/debug/common/debug.ts
+1
-0
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+15
-1
src/vs/workbench/parts/debug/node/debugAdapter.ts
src/vs/workbench/parts/debug/node/debugAdapter.ts
+2
-0
未找到文件。
src/vs/workbench/parts/debug/common/debug.ts
浏览文件 @
05c236fc
...
...
@@ -198,6 +198,7 @@ export interface IRawAdapter extends IRawEnvAdapter {
enableBreakpointsFor
?:
{
languageIds
:
string
[]
};
configurationAttributes
?:
any
;
initialConfigurations
?:
any
[];
aiKey
?:
string
;
win
?:
IRawEnvAdapter
;
winx86
?:
IRawEnvAdapter
;
windows
?:
IRawEnvAdapter
;
...
...
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
05c236fc
...
...
@@ -16,6 +16,7 @@ import severity from 'vs/base/common/severity';
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
editor
=
require
(
'
vs/editor/common/editorCommon
'
);
import
aria
=
require
(
'
vs/base/browser/ui/aria/aria
'
);
import
{
AIAdapter
}
from
'
vs/base/node/aiAdapter
'
;
import
editorbrowser
=
require
(
'
vs/editor/browser/editorBrowser
'
);
import
{
IKeybindingService
,
IKeybindingContextKey
}
from
'
vs/platform/keybinding/common/keybindingService
'
;
import
{
IMarkerService
}
from
'
vs/platform/markers/common/markers
'
;
...
...
@@ -65,6 +66,7 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
private
viewModel
:
viewmodel
.
ViewModel
;
private
configurationManager
:
ConfigurationManager
;
private
debugStringEditorInputs
:
DebugStringEditorInput
[];
private
telemetryAdapter
:
AIAdapter
;
private
lastTaskEvent
:
TaskEvent
;
private
toDispose
:
lifecycle
.
IDisposable
[];
private
inDebugMode
:
IKeybindingContextKey
<
boolean
>
;
...
...
@@ -282,7 +284,15 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
this
.
toDispose
.
push
(
this
.
session
.
addListener2
(
debug
.
SessionEvents
.
OUTPUT
,
(
event
:
DebugProtocol
.
OutputEvent
)
=>
{
if
(
event
.
body
&&
event
.
body
.
category
===
'
telemetry
'
)
{
this
.
telemetryService
.
publicLog
(
event
.
body
.
output
,
event
.
body
.
data
);
const
key
=
this
.
configurationManager
.
getAdapter
().
aiKey
;
// only log telemetry events from debug adapter if the adapter provided the telemetry key
if
(
key
)
{
if
(
!
this
.
telemetryAdapter
)
{
this
.
telemetryAdapter
=
new
AIAdapter
(
key
,
this
.
session
.
getType
());
}
this
.
telemetryAdapter
.
log
(
event
.
body
.
output
,
event
.
body
.
data
);
}
}
else
if
(
event
.
body
&&
typeof
event
.
body
.
output
===
'
string
'
&&
event
.
body
.
output
.
length
>
0
)
{
this
.
onOutput
(
event
);
}
...
...
@@ -673,6 +683,10 @@ export class DebugService extends ee.EventEmitter implements debug.IDebugService
});
this
.
model
.
updateBreakpoints
(
data
);
if
(
this
.
telemetryAdapter
)
{
this
.
telemetryAdapter
.
dispose
();
this
.
telemetryAdapter
=
null
;
}
this
.
inDebugMode
.
reset
();
}
...
...
src/vs/workbench/parts/debug/node/debugAdapter.ts
浏览文件 @
05c236fc
...
...
@@ -20,6 +20,7 @@ export class Adapter {
private
configurationAttributes
:
any
;
public
initialConfigurations
:
any
[];
public
enableBreakpointsFor
:
{
languageIds
:
string
[]
};
public
aiKey
:
string
;
constructor
(
rawAdapter
:
debug
.
IRawAdapter
,
systemVariables
:
SystemVariables
,
extensionFolderPath
:
string
)
{
if
(
rawAdapter
.
windows
)
{
...
...
@@ -67,6 +68,7 @@ export class Adapter {
this
.
initialConfigurations
=
rawAdapter
.
initialConfigurations
;
this
.
_label
=
rawAdapter
.
label
;
this
.
enableBreakpointsFor
=
rawAdapter
.
enableBreakpointsFor
;
this
.
aiKey
=
rawAdapter
.
aiKey
;
}
public
get
label
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录