Forum > Debugger

Exception message doesn't contain variables in Lazarus popup?

(1/3) > >>

Eugene Loza:
I wonder if this is intended behavior or did I setup the debugger (FpDebug) incorrectly?

When I get a popup in Lazarus about an exception, it shows me the "line which triggered the exception" but not the exception message (see attached screenshot).

When I press "Break" and try to see the variables for myself I get "Failed to read data from register".

The only way to get the information on what exactly went wrong is to set a breakpoint at the line, the variables then are showing properly, before the exception happens.

Martin_fr:
It should show the message (assuming there is one).

Can you check in a simple app (in OnFormCreate)?

--- 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";}};} ---raise Exception.Create('foo bar '+IntToStr(Random(99)));
Also:
OS?
32/64 bit?
Optimization settings?

FPC version?
Custom FPC build?

Eugene Loza:
Ok, so something seems like really broken on my side  :D It doesn't show the message at all in a "blank project" (neither GUI nor console) - see attachment for GUI project.

OS? 32/64 bit? - Win10x64. I'm almost sure I've had the same issue in Debian12x64, but didn't pay too much attention.
Optimization settings? - Different, usually the "default" Debug mode (the one created in Project Settings). However, now that I think about it the error message in the first post was inside of a LPK, most likely Castle Game Engine (can double check if needed, can be deeper, in FPC's DOM unit), as far as I know the packages use their own optimization settings, and if I read it correctly it should be -O2.
FPC version? - Trunk, around a month or two old.
Custom FPC build? - installed from FPCUpDeluxe.

Martin_fr:
Fpc 3.3.1 / trunk?

I just tested that, and it seems that it does not work.

I just recall, the fields in TObject may have changed. Since debug info for exceptions is not always available the debugger relies on fixed field locations. So this may need to be updated (this would likely affect gdb and fpdebug).

Eugene Loza:

--- Quote from: Martin_fr on June 20, 2024, 08:17:55 pm ---Fpc 3.3.1 / trunk?
--- End quote ---
yes, Lazarus 3.99 (rev main_3_99-1744-g0261f3b5ee) FPC 3.3.1 x86_64-win64-win32/win64 / Free Pascal Compiler version 3.3.1-15296-g6a28ac53da [2024/02/27] for x86_64
(I wonder why February? I certainly remember updating somewhere very recently...)

Navigation

[0] Message Index

[#] Next page

Go to full version