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

Method _onThreadPaused

valdi/vscode_debugger/src/adapter/threads.ts:1366–1395  ·  view source on GitHub ↗
(details: IPausedDetails)

Source from the content-addressed store, hash-verified

1364 }
1365
1366 private async _onThreadPaused(details: IPausedDetails) {
1367 this._expectedPauseReason = undefined;
1368 this._onPausedEmitter.fire(details);
1369
1370 // If we hit breakpoints, try to make sure they all get resolved before we
1371 // send the event to the UI. This should generally only happen if the UI
1372 // bulk-set breakpoints and some resolve faster than others, since we expect
1373 // the CDP in turn will tell *us* they're resolved before hitting them.
1374 if (details.hitBreakpoints) {
1375 await Promise.race([
1376 delay(1000),
1377 Promise.all(
1378 details.hitBreakpoints
1379 .map(bp => this._breakpointManager._resolvedBreakpoints.get(bp))
1380 .filter((bp): bp is UserDefinedBreakpoint => bp instanceof UserDefinedBreakpoint)
1381 .map(r => r.untilSetCompleted()),
1382 ),
1383 ]);
1384 }
1385
1386 this._dap.with(dap =>
1387 dap.stopped({
1388 reason: details.reason,
1389 description: details.description,
1390 threadId: this.id,
1391 text: details.text,
1392 allThreadsStopped: false,
1393 }),
1394 );
1395 }
1396
1397 private _onThreadResumed() {
1398 this._dap.with(dap =>

Callers 2

refreshStackTraceMethod · 0.95
_onPausedMethod · 0.95

Calls 9

delayFunction · 0.90
fireMethod · 0.80
filterMethod · 0.80
untilSetCompletedMethod · 0.80
withMethod · 0.80
stoppedMethod · 0.80
allMethod · 0.65
getMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected