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

Function shouldStepOverStackFrame

src/adapter/smartStepping.ts:20–41  ·  view source on GitHub ↗
(
  stackFrame: StackFrame,
)

Source from the content-addressed store, hash-verified

18}
19
20export async function shouldStepOverStackFrame(
21 stackFrame: StackFrame,
22): Promise<StackFrameStepOverReason> {
23 const uiLocation = await stackFrame.uiLocation();
24 if (!uiLocation) {
25 return StackFrameStepOverReason.NotStepped;
26 }
27
28 if (uiLocation.source.blackboxed()) {
29 return StackFrameStepOverReason.Blackboxed;
30 }
31
32 if (!isSourceWithMap(uiLocation.source)) {
33 return StackFrameStepOverReason.NotStepped;
34 }
35
36 if (!uiLocation.isMapped && uiLocation.unmappedReason === UnmappedReason.MapPositionMissing) {
37 return StackFrameStepOverReason.SmartStep;
38 }
39
40 return StackFrameStepOverReason.NotStepped;
41}
42
43const neverStepReasons: ReadonlySet<PausedReason> = new Set(['breakpoint', 'exception', 'entry']);
44

Callers 2

StackFrameClass · 0.90
getSmartStepDirectionMethod · 0.85

Calls 3

isSourceWithMapFunction · 0.90
uiLocationMethod · 0.80
blackboxedMethod · 0.80

Tested by

no test coverage detected