changed behaviour from gdb to Fpdebug ? lazarus / 12-Debugger ---------------------------------------------------------------------- Paolo · 2022-01-14 12:47 hello, installed both laz 2.012 fpc 3.2.0 and laz  2.2.0 fpc 3.2.2. now using "default" mode I see what is reported in the picture in, what wrong I have done ? Esssentially the variable DeltaF is identified but its value not diplayed in the hint (mostrly standard installation, even if in one pc all went fine whereas in this pc the installer asked where to find FpDebug or something like that  I apply a sort of restore to default - I do not remember exactly), I have toc heck in the other PC. OS = win 10-pro. ---------------------------------------------------------------------- Martin_fr · 2022-01-14 14:10 32 or 64 bit? (IDE and compiled app have the same bitness, or cross compiled?)? The variable is indeed "double"? Not by some setting "extended" (e.g. type double = extended;)? What kind of variable is DeltaF? Local, global, Field (of object / record), ...? What debug type info is used ? (dwarf, dwarf-3, stabs)?  If this is in a package, what is used for the package? ---------------------------------------------------------------------- Martin_fr · 2022-01-14 14:15 Quote from: Paolo on January 14, 2022, 01:47:37 pm whereas in this pc the installer asked where to find FpDebug or something like that  I apply a sort of restore to default - Without the exact error, I can't tell what may have happened... Try at least to do a "clean build" of the IDE (in case there is any "memory" of a previous install in another location): 1) Menu: Package > open package from file    Open the following packages (from the install directory of this IDE)    components/fpdebug/fpdebug.lpk    components/lazdebuggers/lazdebuggerfp/lazdebuggerfp.lpk 2) Menu: Tools > Configure build Lazarus    Radio-button "clean all" => build => restart IDE. Check Tools > Options > Debugger Backend ---------------------------------------------------------------------- Paolo · 2022-01-14 14:31 Hi Martin, Quote32 or 64 bit? (IDE and compiled app have the same bitness, or cross compiled?)? 64 bit QuoteThe variable is indeed "double"? Not by some setting "extended" (e.g. type double = extended;)? Yes it is, normal double; QuoteWhat kind of variable is DeltaF? Local, global, Field (of object / record), ...? local 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 procedure xxx;var  DeltaF : double;  QuoteWhat debug type info is used ? (dwarf, dwarf-3, stabs)? dwarf with set QuoteIf this is in a package, what is used for the package? no, a procedure in a unit used only for this project (*.pas). Please note that with the settings "Debug" mode DeltaF is correctly displayed. ---------------------------------------------------------------------- Paolo · 2022-01-14 14:40 QuoteWithout the exact error, I can't tell what may have happened.. see the attached screen shot, at very first start the tab shown in the picture hileghted a problem, something to be corrected, and then I click on the button "Restore fppkg configuration" ---------------------------------------------------------------------- Paolo · 2022-01-14 14:49 reloaunched two times startlazarus.exe, and now all works fine (that what I did: startlazarus and selected a path in the dropdown menu, then run the IDE, now even worse something like : "no debug... etc..." startlazarus again -> start IDE -> now all fine !) ---------------------------------------------------------------------- Martin_fr · 2022-01-14 14:56 Ah "Fppkg" => Free Pascal Packager manager. Nothing to do with debugging (and nothing I can help with, sorry / but applying default conf should be ok) QuotePlease note that with the settings "Debug" mode DeltaF is correctly displayed. As in (Menu: Project) "Project Options" (or the "options/gear" button in the main toolbar), and then the button "Build Modes" / "..." > "Create Debug and Release modes". And then selecting the "Debug" build mode and it works? Or some other "Debug mode" ? In the "Release" mode it is not expected to work. Though, some detail is missing here. You picture shows the "blue dots" at the left of the editor. Those should only be there in debug mode. ---------------------------------------------------------------------- Martin_fr · 2022-01-14 14:58 Quote from: Paolo on January 14, 2022, 03:49:51 pmreloaunched two times startlazarus.exe, and now all works fine (that what I did: startlazarus and selected a path in the dropdown menu, then run the IDE, now even worse something like : "no debug... etc..." startlazarus again -> start IDE -> now all fine !) What does it show in Tools > Options > Debug > Debugger Backend ? In the toolbar at the top, is a drop down button, that either has - .... (FpDebug) - .... (gdb) Which does it have? ---------------------------------------------------------------------- Paolo · 2022-01-14 15:29 Now I am confused, the menu Tools > Options > Debug > Debugger Backend show gdb as debugger ! but I am sure that it was initially set to FPDebug even because it ask me for setting it ! (see picture), I select the first choice (), and I saw it in project > debugging menu. How can I proceed "in a correct way" to set Fpdebug ? ---------------------------------------------------------------------- Paolo · 2022-01-14 15:30 the missed image ---------------------------------------------------------------------- Paolo · 2022-01-14 15:35 Now set FpDebug and the problem raises again ---------------------------------------------------------------------- Paolo · 2022-01-14 15:43 to work I have to downgrade the default from -o2 to -o1 ---------------------------------------------------------------------- Martin_fr · 2022-01-14 16:05 Ok, yes the image: That is normal. And you can select any of the 3  options (other than cancel) "dwarf 2" => is rather limited, and has NO advantages. It is a subset of "dwarf with sets" "dwarf with sets" => works well / identifiers are all uppercased. "dwarf 3" => works well, but if you switch back to gdb, you should go to project options and switch to "dwarf with sets" "dwarf 3" => has an issue with "variant" variables. If you need those "dwarf with sets" Quote from: Paolo on January 14, 2022, 04:43:25 pmto work I have to downgrade the default from -o2 to -o1  -O2 is not suitable for debugging. It may sometimes work. But that is just luck. Also, it may lead to WRONG values shown. This is not an issue of the debugger. FPC does not provide info to the debugger about the optimizations, and values that for example went into registers can not be accessed (due to the missing info). Even "-O1" can in rare cases, lead to incorrect values shown in the debugger. (Usually the value is update when stepping a 2nd time after it was assigned)