MCPcopy Index your code
hub / github.com/nodejs/node / waitInitialBreak

Function waitInitialBreak

test/parallel/test-debugger-heap-profiler.js:21–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19 const cli = startCLI([fixtures.path('debugger/empty.js')], [], opts);
20
21 async function waitInitialBreak() {
22 try {
23 await cli.waitForInitialBreak();
24 await cli.waitForPrompt();
25 await cli.command('takeHeapSnapshot()');
26 JSON.parse(readFileSync(filename, 'utf8'));
27 // Check that two simultaneous snapshots don't step all over each other.
28 // Refs: https://github.com/nodejs/node/issues/39555
29 await cli.command('takeHeapSnapshot(); takeHeapSnapshot()');
30 JSON.parse(readFileSync(filename, 'utf8'));
31 } finally {
32 await cli.quit();
33 }
34 }
35
36 // Check that the snapshot is valid JSON.
37 waitInitialBreak().then(common.mustCall());

Callers 1

Calls 3

commandMethod · 0.80
parseMethod · 0.65
readFileSyncFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…