Skip to content

Commit 97212ac

Browse files
committed
switch to use DEBUG_SESSION_START event with new trigger type
1 parent 2c41ad3 commit 97212ac

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/extension/noConfigDebugInit.ts

+7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ import {
1414
} from 'vscode';
1515
import { createFileSystemWatcher, debugStartDebugging } from './utils';
1616
import { traceError, traceVerbose } from './common/log/logging';
17+
import { sendTelemetryEvent } from './telemetry';
18+
import { EventName } from './telemetry/constants';
19+
import { TriggerType } from './types';
1720

1821
/**
1922
* Registers the configuration-less debugging setup for the extension.
@@ -84,6 +87,10 @@ export async function registerNoConfigDebug(
8487
// create file system watcher for the debuggerAdapterEndpointFolder for when the communication port is written
8588
const fileSystemWatcher = createFileSystemWatcher(new RelativePattern(tempDirPath, '**/*'));
8689
const fileCreationEvent = fileSystemWatcher.onDidCreate(async (uri) => {
90+
sendTelemetryEvent(EventName.DEBUG_SESSION_START, undefined, {
91+
trigger: 'noConfig' as TriggerType,
92+
});
93+
8794
const filePath = uri.fsPath;
8895
fs.readFile(filePath, (err, data) => {
8996
const dataParse = data.toString();

src/extension/telemetry/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ export interface IEventNamePropertyMapping {
303303
* - `launch`: Launch/start new code and debug it.
304304
* - `attach`: Attach to an exiting python process (remote debugging).
305305
* - `test`: Debugging python tests.
306+
* - `noConfig`: No config debugging.
306307
*
307308
* @type {TriggerType}
308309
*/

src/extension/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export interface DebugConfigurationArguments extends LaunchRequestArguments, Att
147147

148148
export type ConsoleType = 'internalConsole' | 'integratedTerminal' | 'externalTerminal';
149149

150-
export type TriggerType = 'launch' | 'attach' | 'test';
150+
export type TriggerType = 'launch' | 'attach' | 'test' | 'noConfig';
151151

152152
export type IStartupDurations = Record<
153153
'totalNonBlockingActivateTime' | 'totalActivateTime' | 'startActivateTime' | 'codeLoadingTime',

0 commit comments

Comments
 (0)