MCPcopy Create free account
hub / github.com/firebase/firebase-tools / isDebugMode

Function isDebugMode

src/track.ts:369–384  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

367}
368
369function isDebugMode(): boolean {
370 const account = getGlobalDefaultAccount();
371 if (account?.user.email.endsWith("@google.com")) {
372 try {
373 require("../tsconfig.json");
374 logger.debug(
375 `Using Google Analytics in DEBUG mode. Emulators (+ UI) events will be shown in GA Debug View only.`,
376 );
377 return true;
378 } catch {
379 // The file above present in the repo but not packaged to npm. If require
380 // fails, just turn off debug mode since the CLI is not in development.
381 }
382 }
383 return false;
384}

Callers 1

sessionFunction · 0.85

Calls 1

getGlobalDefaultAccountFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…