Forum > Debugger
FpDebug: Stack updates while "Run" -- Split from: "Help me collect debug-issues"
piola:
Please wait before doing unnecessary work. I'll definitely try to get a debug log. But please give me a few days to let the issue happen again ;)
Martin_fr:
Here is how to make it happen. (The Randomize are just so there is some code to execute, could be anything else)
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---program Project1;{$mode objfpc}{$H+} uses SysUtils; var bar: boolean; procedure Foo;begin while true do begin try try try if bar then raise Exception.Create(''); Randomize; finally Randomize; try Randomize; finally Randomize; end; end; Randomize; finally Randomize; end; Randomize; except bar := false; Randomize; end; end;end; begin bar := true; Foo;end.
- Run
- When it reaches the exception, chose "break" in the dialog.
- Do a single F8 (step over). This should go to the finally block.
- Run
And the stack will keep updating.....
No longer needing a log. Can do my own now.
Martin_fr:
Possible patch / still testing...
--- Code: Diff [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---diff --git a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pasindex 24ed067d14..08faf38ef7 100644--- a/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas+++ b/components/lazdebuggers/lazdebuggerfp/fpdebugdebugger.pas@@ -3083,6 +3083,7 @@ procedure TFpDebugExceptionStepping.UserCommandRequested( bplFpcSpecific, bplRtlRestoreContext, bplRtlUnwind, {$ENDIF} bplFpcExceptHandler ,bplFpcFinallyHandler, bplFpcLeaveHandler,+ bplSehW32Except, bplSehW32Finally, {$ENDIF} bplStepOut]); @@ -3092,6 +3093,7 @@ procedure TFpDebugExceptionStepping.UserCommandRequested( {$IFDEF WIN64} , bplRtlRestoreContext, bplFpcSpecific {$ENDIF} , bplFpcExceptHandler ,bplFpcFinallyHandler, bplFpcLeaveHandler {$ENDIF}+ , bplSehW32Except, bplSehW32Finally ]); case st of@@ -3104,6 +3106,7 @@ procedure TFpDebugExceptionStepping.UserCommandRequested( {$IFDEF MSWINDOWS} {$IFDEF WIN64} , bplFpcSpecific {$ENDIF} , bplFpcExceptHandler ,bplFpcFinallyHandler, bplFpcLeaveHandler+ , bplSehW32Except, bplSehW32Finally {$ENDIF} ]); end
Martin_fr:
OK, the patch passed my testing. Applied to fixes branch.
Navigation
[0] Message Index
[*] Previous page