Debugger: If asm stepping stops in source (e.g. asm-step over hits breakpoint / or step ends at known source) then update source-editor. Fix regression from issue #40415 f051d0bd65

This commit is contained in:
Martin 2024-11-06 13:00:06 +01:00
parent 93da1812b9
commit 5111f33390

View File

@ -1770,18 +1770,20 @@ begin
// jump editor to execution line
Flags := [jfAddJumpPoint, jfSearchVirtualFullPath];
if (FCurrentBreakPoint = nil) or (FCurrentBreakPoint.AutoContinueTime = 0)
then include(Flags, jfFocusEditor);
if ( (not FAsmStepping) or (FDialogs[ddtAssembler] = nil) or
(not FDialogs[ddtAssembler].IsVisible) or (not FDialogs[ddtAssembler].Active)
) and
( (FCurrentBreakPoint = nil) or (FCurrentBreakPoint.AutoContinueTime = 0) )
then
include(Flags, jfFocusEditor);
i := SrcLine;
if (Editor <> nil) then
i := Editor.DebugToSourceLine(i);
if not (FAsmStepping and (FDialogs[ddtAssembler] <> nil) and
FDialogs[ddtAssembler].IsVisible and FDialogs[ddtAssembler].Active )
then
if MainIDE.DoJumpToCodePosition(nil,nil,NewSource,1,i,-1,-1,-1,Flags)<>mrOk
then exit;
FAsmStepping := False;
if MainIDE.DoJumpToCodePosition(nil,nil,NewSource,1,i,-1,-1,-1,Flags)<>mrOk
then exit;
// mark execution line
if (Editor = nil) and (SourceEditorManager <> nil) then
Editor := SourceEditorManager.ActiveEditor;