MCPcopy Create free account
hub / github.com/Snapchat/Valdi / logTarget

Function logTarget

valdi/vscode_debugger/src/test/browser/framesTest.ts:14–26  ·  view source on GitHub ↗
(t: ITarget, indent: number)

Source from the content-addressed store, hash-verified

12 p.load();
13
14 const logTarget = (t: ITarget, indent: number) => {
15 const s = ' '.repeat(indent);
16 p.log(
17 `${s}${t.type()} "${t.name()}" [thread "${t.scriptUrlToUrl('')}"]${
18 t.fileName() ? ' @ ' + t.fileName() : ''
19 }`,
20 );
21 const children = t.children();
22 children.sort((t1, t2) => {
23 return t1.name().localeCompare(t2.name());
24 });
25 children.forEach(child => logTarget(child, indent + 2));
26 };
27
28 await new Promise(f => {
29 r.onSessionCreated(() => {

Callers 1

framesTest.tsFile · 0.85

Calls 8

logMethod · 0.65
typeMethod · 0.65
nameMethod · 0.65
scriptUrlToUrlMethod · 0.65
fileNameMethod · 0.65
childrenMethod · 0.65
sortMethod · 0.65
forEachMethod · 0.65

Tested by

no test coverage detected