MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / ensureDebugLaunchUniqueId

Function ensureDebugLaunchUniqueId

src/extension/utils.ts:163–170  ·  view source on GitHub ↗
(config: BasicDebugConfiguration)

Source from the content-addressed store, hash-verified

161/// which might be after we recieve some events (since VS Code fires its event late - after all
162/// initialisation has completed).
163export function ensureDebugLaunchUniqueId(config: BasicDebugConfiguration): string {
164 const conf = config as any;
165 if (!conf.dartCodeDebugSessionID) {
166 const dartCodeDebugSessionID = `session-${getRandomInt(0x10000, 0x100000).toString(16)}`;
167 conf.dartCodeDebugSessionID = dartCodeDebugSessionID;
168 }
169 return conf.dartCodeDebugSessionID as string;
170}
171
172export function isValidEntryFile(file: string | undefined) {
173 if (!file || !isDartFile(file))

Calls 2

getRandomIntFunction · 0.90
toStringMethod · 0.45

Tested by

no test coverage detected