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 {
540540 }
541541}
542542
543+ const KEEP_SUBTLE_FRAME_AT_TOP_REASONS : readonly string [ ] = [ 'breakpoint' , 'step' , 'function breakpoint' ] ;
544+
543545export class Thread implements IThread {
544546 private callStack : IStackFrame [ ] ;
545547 private staleCallStack : IStackFrame [ ] ;
@@ -578,10 +580,11 @@ export class Thread implements IThread {
578580
579581 getTopStackFrame ( ) : IStackFrame | undefined {
580582 const callStack = this . getCallStack ( ) ;
583+ const stopReason = this . stoppedDetails ?. reason ;
581584 // Allow stack frame without source and with instructionReferencePointer as top stack frame when using disassembly view.
582585 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 ) ) ) ) ) ;
585588 return firstAvailableStackFrame ;
586589 }
587590
You can’t perform that action at this time.
0 commit comments