debugger not showing variable values lazarus / 12-Debugger ---------------------------------------------------------------------- rohran · 2025-04-22 22:20 It was for a  while, but then it stopped.  When I hover the cursor over a variable at a breakpoint, it gives the name and type but it stopped giving the value. Obviously I've set a parameter wrong some where. ---------------------------------------------------------------------- Martin_fr · 2025-04-22 22:34 Please check this page: https://wiki.lazarus.freepascal.org/Debugger_Setup Please additionally check in the "Project options" in the tree for the "Debugger page" and that the backend there is set to "IDE defaults" (if it is set to project, but says in red that it is using ide default, then that is fine) Check if you have build modes, and if you use the release build mode? Are you sure you hover over variables? Not properties? (properties only work if they do directly access a field / if there is NO getter method). If that does not help. Your OS? Your CPU? When you run the project, are there little blue dots next to the line numbers? Does it stop on breakpoints (probably, otherwise inspecting variable would not be possible at all). ---------------------------------------------------------------------- rohran · 2025-04-22 23:39 didn't seem to work.  it was working this way (without data) while I was trying to debug a program and something I did caused it to display values for the variables as well as the name and type but then something I did made it stop displaying the variable value ---------------------------------------------------------------------- Martin_fr · 2025-04-22 23:44 QuoteYour OS? Your CPU? When you run the project, are there little blue dots next to the line numbers? What does the locals window show and the stack? Menu: View > Debug Windows > Locals View > Debug Windows > Stack ---------------------------------------------------------------------- rohran · 2025-04-23 01:46 nothing in either the stack or local variables ---------------------------------------------------------------------- 440bx · 2025-04-23 02:37 Just for good measure, check the setting of "Compiler Options->Debugging->Type of debug info" is set to one of the Dwarf options.    If it is set to Stabs, that's most likely the reason you're not seeing the information you expect. ---------------------------------------------------------------------- rohran · 2025-04-23 03:16 it is set to a beta copy of dwarf 3 ---------------------------------------------------------------------- rohran · 2025-04-23 03:24 I have no idea what I did, except reloading an older version from backdrive and exiting lazarus, but it is working now ---------------------------------------------------------------------- Martin_fr · 2025-04-23 07:13 Do you use "external debug info" (Project options > Debugger)? If so, try to disable that. External debug info create a dbg file. This may get outdated and if it does then it stops working. Is the problem in all units? Is the problem with a new project too (if you try and test a new project)? ---------------------------------------------------------------------- rohran · 2025-04-23 21:05 I didn't have the external debug info box checked.  I haven't tried it with any other units. This is my first attempt at lazarus. It's a video poker game..about 1500 lines of code. ---------------------------------------------------------------------- Martin_fr · 2025-04-23 22:56 I ask again, what is your OS? (and CPU type? x86 / i386 / aarch / M1,M2...) Also, I don't actually know which version of the IDE you are currently using? Also please confirm - your project pauses at breakpoints   => That is the breakpoint is   red   has a green arrow on it - but there is no data in inspect hints / nothing in the local windows - nothing if you add a variable to the watches window ? This also happens if you create a new app (console or gui) and just add a procedure with some local variables? (Make sure to assign something to the variable, or the compiler may leave it away) You have "Optimization" turned off, or at level 1 ? You have "Debug info type" set to "Dwarf..." e.g dwarf with sets, or dwarf 3? If none of that work, then while testing with a new project - make sure there is no debugger backend selected in the project options (by default there isn't) - change the backend in the "Tools > Options > Debugger > Backend" Well if you are on Mac, then there is nothing to change. You must have "LLDB + fpdebug) If you are on Win or Linux (and x86 or i386) toggle between "FpDebug" and "Gnu debugger GDB" (some name like that). See if either of them works. If that doesn't work, lets temporary remove config to have the IDE use defaults. Your setting are in the "primary config path" Menu: VIew > IDE internals > About IDE Linux ~/.lazarus Win  C:\Users\USERNAME\AppData\Local\lazarus Before starting the IDE, backup and remove the file debuggeroptions.xml If that helps please post the problematic file. If not, sorry nighttime now / tomorrow. ---------------------------------------------------------------------- rohran · 2025-04-24 00:44 Lazarus IDE version 3.8   on windows 11, dell computer  I7 processor did you catch that after I pulled on older version of the program off of a usb drive and restarted lazarus, the debuggerr is now working properly... it shows values of variables as well as a link to where they are defined. I don't know what I did to make it stop working. It might have been caused by my cat jumping on my keyboard. It also shows information in the local variables and the stack windows where before it wasn't.  the watches all show data now whereas before they said I appreciate your help, Martin.  BTW where are you?  does the fr after your name mean france? regards Richard Ohran, designer of the Lilith ---------------------------------------------------------------------- Martin_fr · 2025-04-24 08:56 Quote from: rohran on April 24, 2025, 02:44:52 amdid you catch that after I pulled on older version of the program off of a usb drive and restarted lazarus, the debuggerr is now working properly... Ok, if the older version works, then it is not an IDE setting. Yet to know what we are dealing with it would be good to know which "debugger backend" you are using. It should be FpDebug. Please check that, and let me know. In that case I suggest to compare the 2 lpi files (and maybe the lps files too. In the project options, you would have by now checked the settings - Project Options > Debugger (in the upper half of the tree) - Compiler Options > Debugging (in the lower half)   Enabled and chosen DWARF   NO "strip symbols"   NO "external symbols"   "Run uses debugger" - "Compilation and Linking"   Optimization off or 1 Check the page "Custom options". Report if there are any. Check the page "Linking"   NO "smart linking" Feel free to attach your lpi and lps file, then I can check through the settings for you. run lazarus with the following command line (create a shortcut, and edit the properties of the short cut) Change the name of the logfile as you like Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  --debug- log=c:\lazarus\logfile.txt   -dDBG_VERBOSE  -dDBG_WARNINGS  -dDBG_ERRORS  -dDBG_VERBOSE_BRKPOINT  -dDBG_STATE  -dDBG_EVENTS  -dDBG_COMMAND_ECHO  -dDBG_DATA_MONITORS  -dDBG_LOCATION_INFO  -dDBG_BREAKPOINTS  -dDBGMI_QUEUE_DEBUG  -dDBGMI_WITH_DISASS_OVERFLOW  -dDBG_WITH_DEBUGGER_DEBUG  -dDBGMI_TYPE_INFO  -dDBG_FPDEBUG_VERBOSE  -dFPDBG_BREAKPOINT_ERRORS  -dFPDBG_BREAKPOINTS  -dFPDBG_COMMANDS  -dFPDBG_THREADS  -dFPDBG_QUEUE Submit the logfile please. There is a file C:\lazarus\fpc\3.2.2\bin\x86_64-win64\objdump.exe When you compiled your project run C:\lazarus\fpc\3.2.2\bin\x86_64-win64\objdump.exe -h  yourproject.exe > headers.txt C:\lazarus\fpc\3.2.2\bin\x86_64-win64\objdump.exe --dwarf=info  yourproject.exe > dwarf.txt Submit the 2 files The 2nd file contains names of your procedures and variables. You may want to mail it in private if you do not want this to be public. lazarus #a#t# mfriebe #.# de Germany