In 2.0, I am observing severe problems when debugging. Is there someone else having problems?
My setup is Win x64, using Lazarus x64, cross-compiling to Win32.
In the 2.0 release, the "evaluate/watch" windows (as well as the tooltip when hovering over a variable) shows only rubbish data for strings. Records are displayed as "no symbol in current context". Only very basic types (integer, float) seem to be ok. This hasn't occured in the release candidates. (I already tried various dwarf2/dwarf3 settings, but without success.)
In addition to that, the debugger crashes very frequently. It is enough to have a single breakpoint at which the program execution is paused and then removing that breakpoint. Setting or removing breakpoints while the program is running is a no-go and almost always crashes the debugger. These problems have occured only rarely in 1.8, but were already present in the 2.0 release candidates.
Is there something more I can try?
I can't think of any change that would have introduced this. Not on the gdb based debugger.
It would be good if you can get a log of some of the errors.
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_sessionIf watches/locals are botched, you can also open the history window, and export the history. This will allow me to see the watches in my IDE, as you had seen them in yours.
Both, log and history, contain data from your app. In case you have sensitive data, we can discuss sending them privately.
A short sample code may also help.
Also do problems (for each case of problem) apply to:
global var
fields of self
class fields of other classes: foo.somestring
local vars
local vars but accessed from a nested procedure
params
var params
You do not need to test them all, just specify for those that fail in your code.
You can try to use alternative gdb versions.
For 32 bit (including cross compiled to 32 bits)
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Alternative%20GDB/You can also try to make sure that packages, if they have debug info, use the same type as your project.
GDB's stabs support is declining. But fpc on win32 still defaults to that. And if you change your project settings, packages may still use stabs, and that can be an issue.
Either edit Tools > Configure build IDE: and add -gw for dwarf
Or go to additions and overrides, and create an entry for all package, except project (IIRC *,-#project or similar, search our wiki) and set it to -gw or to -g- if you need no debug info for packages.