File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/vs/workbench/contrib/debug/common Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -540,6 +540,8 @@ export class StackFrame implements IStackFrame {
540
540
}
541
541
}
542
542
543
+ const KEEP_SUBTLE_FRAME_AT_TOP_REASONS : readonly string [ ] = [ 'breakpoint' , 'step' , 'function breakpoint' ] ;
544
+
543
545
export class Thread implements IThread {
544
546
private callStack : IStackFrame [ ] ;
545
547
private staleCallStack : IStackFrame [ ] ;
@@ -578,10 +580,11 @@ export class Thread implements IThread {
578
580
579
581
getTopStackFrame ( ) : IStackFrame | undefined {
580
582
const callStack = this . getCallStack ( ) ;
583
+ const stopReason = this . stoppedDetails ?. reason ;
581
584
// Allow stack frame without source and with instructionReferencePointer as top stack frame when using disassembly view.
582
585
const firstAvailableStackFrame = callStack . find ( sf => ! ! (
583
- ( ( this . stoppedDetails ?. reason === 'instruction breakpoint' || ( this . stoppedDetails ?. reason === 'step' && this . lastSteppingGranularity === 'instruction' ) ) && sf . instructionPointerReference ) ||
584
- ( sf . source && sf . source . available && ! isFrameDeemphasized ( sf ) ) ) ) ;
586
+ ( ( stopReason === 'instruction breakpoint' || ( stopReason === 'step' && this . lastSteppingGranularity === 'instruction' ) ) && sf . instructionPointerReference ) ||
587
+ ( sf . source && sf . source . available && ( KEEP_SUBTLE_FRAME_AT_TOP_REASONS . includes ( stopReason ! ) || ! isFrameDeemphasized ( sf ) ) ) ) ) ;
585
588
return firstAvailableStackFrame ;
586
589
}
587
590
You can’t perform that action at this time.
0 commit comments