Evaluate functions in the debugger lazarus / 12-Debugger ---------------------------------------------------------------------- paulvanderlinden · 2022-07-14 07:16 Hi all, Is it possible to see the result of a function in the evaluate window when debugging a program? f.e. when stepping through Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program Project1;type   { TClass }   TClass=class    function Res:integer;  end; { TClass } function TClass.Res:integer;begin  Result := 42;end; var C:TClass;begin  C := TClass.Create;  C.Res;end.  If I try to see the value of C.Res I get a "Type TCLASS has no component named RES." Is this dependent on debugger/os/?? or is this not possible in general? Paul ---------------------------------------------------------------------- Zvoni · 2022-07-14 07:28 Pretty much the same: https://forum.lazarus.freepascal.org/index.php/t opic,59852.msg446723.html#msg446723 ---------------------------------------------------------------------- paulvanderlinden · 2022-07-14 07:33 Thanks! Not the answer I was hoping for, but at least it clarifies it ---------------------------------------------------------------------- Martin_fr · 2022-07-14 08:51 Yes, for some functions. (only retuning, int or ordinal value / not returning string or managed types / strings work in trunk when using dwarf-3) Tools > Debugger > General: enable function calling And enable for each watch individually in its properties. Should work if the function body is in your code. And in case of methods, in the same unit. Quote from: paulvanderlinden on July 14, 2022, 09:16:19 amIf I try to see the value of C.Res I get a "Type TCLASS has no component named RES." Is this dependent on debugger/os/?? or is this not possible in general? Only with FpDebug (tools > debugger > backend) On Win 64/32 and Linux 64.  (And Linux 32 bit with Lazarus 2.3 main- branch)