MCPcopy Create free account
hub / github.com/Marus/cortex-debug / beginSession

Function beginSession

src/reporting.ts:79–102  ·  view source on GitHub ↗
(id: string, opts: ConfigurationArguments)

Source from the content-addressed store, hash-verified

77}
78
79function beginSession(id: string, opts: ConfigurationArguments) {
80 if (!telemetryEnabled()) { return; }
81
82 if (opts.rtos) { analytics.set(RTOS_TYPE_DIMENSION, opts.rtos); }
83 if (opts.device) { analytics.set(DEVICE_ID_DIMENSION, opts.device); }
84 analytics.set(GDB_SERVER_TYPE_DIMENSION, opts.servertype);
85
86 analytics.screenview('Debug Session', 'Cortex-Debug', extensionVersion, extensionId);
87 analytics.event('Session', 'Started', '', 0, { sessionControl: 'start' });
88
89 if (opts.swoConfig.enabled) {
90 analytics.event('SWO', 'Used');
91 }
92 if (opts.rttConfig.enabled) {
93 analytics.event('RTT', 'Used');
94 }
95 if (opts.graphConfig.length > 0) {
96 analytics.event('Graphing', 'Used');
97 }
98
99 sessionStarts[id] = new Date();
100
101 analytics.send();
102}
103
104function endSession(id: string) {
105 if (!telemetryEnabled()) { return; }

Callers

nothing calls this directly

Calls 1

telemetryEnabledFunction · 0.85

Tested by

no test coverage detected