MCPcopy
hub / github.com/microsoft/vscode-js-debug / logTarget

Function logTarget

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

Source from the content-addressed store, hash-verified

12 p.load();
13
14 const logTarget = (t: BrowserTarget, 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 as BrowserTarget, indent + 2));
26 };
27
28 await new Promise<void>(f => {
29 r.onSessionCreated(() => {

Callers 1

framesTest.tsFile · 0.85

Calls 7

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

Tested by

no test coverage detected