MCPcopy Create free account
hub / github.com/SKaplanOfficial/Raycast-PromptLab / logDebug

Function logDebug

src/lib/dev-utils.ts:22–63  ·  view source on GitHub ↗
(data: unknown, style = DebugStyle.Info)

Source from the content-addressed store, hash-verified

20 * @param severity The severity of the message, defaults to info.
21 */
22export const logDebug = (data: unknown, style = DebugStyle.Info) => {
23 if (!environment.isDevelopment) return;
24 switch (style) {
25 case DebugStyle.Info:
26 console.log(
27 `[Debug] ${util.inspect(data, {
28 showHidden: true,
29 depth: null,
30 compact: false,
31 maxArrayLength: null,
32 maxStringLength: null,
33 })}`,
34 );
35 break;
36 case DebugStyle.Warn:
37 console.warn(
38 `[Debug] ${util.inspect(data, {
39 showHidden: true,
40 depth: null,
41 compact: false,
42 maxArrayLength: null,
43 maxStringLength: null,
44 })}`,
45 );
46 break;
47 case DebugStyle.Error:
48 console.error(
49 `[Debug] ${util.inspect(data, {
50 showHidden: true,
51 depth: null,
52 compact: false,
53 maxArrayLength: null,
54 maxStringLength: null,
55 })}`,
56 );
57 break;
58 case DebugStyle.Trace:
59 console.trace();
60 logDebug(data, DebugStyle.Error);
61 break;
62 }
63};

Callers 2

getActiveAppFunction · 0.90
execScriptFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected