MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / scriptFor

Function scriptFor

scripts/profile/source_map_server.ts:30–41  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

28}
29
30export function scriptFor(index: number): string {
31 return [
32 `function profileFunction${index}(value) {`,
33 ` console.error(new Error('Profile error from script ' + ${index}));`,
34 ` return value + ${index};`,
35 '}',
36 'globalThis.profileScriptResults ??= [];',
37 `globalThis.profileScriptResults.push(profileFunction${index}(${index}));`,
38 `//# sourceMappingURL=/maps/script-${index}.js.map`,
39 '',
40 ].join('\n');
41}
42
43export async function startSourceMapTestServer(
44 scriptCount = 100,

Callers 1

startSourceMapTestServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected