Recent

Author Topic: [Solved] Appearance of watch/inspected elements strange - possibly missing font?  (Read 1432 times)

Frogfather

  • Jr. Member
  • **
  • Posts: 55
Good morning and apologies for the unhelpful title of this topic. The issue is that, when debugging, if I stop at a breakpoint and either show an object in the 'watch' window or hover over it, the display contains some strange characters. Screenshot attached. I'm wondering if this is due to missing fonts or if anyone else has had (and solved) a similar issue.

Lazarus 2.0.8 (2020-08-31)
FPC version 3.0.4
SNV Revision 62955
x86_64-linux-gtk2

Many thanks in advance for any help

« Last Edit: October 06, 2020, 12:13:36 am by Frogfather »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12288
  • Debugger - SynEdit - and more
    • wiki
Generally this look (at first glance) like a charset issue.

Strings can be encoded in different codepages (in lazarus most are utf8, but if it comes from the db, it may be something else)
The debugger does not have the info what codepage it is.

However, on a 2nd glance, I am not sure.
  FEntityType: 'x'#3
#3 is not a printable char in any codepage that I am aware of.


Other possibilities: The object is corrupted. I.e. the data in memory is indeed trash as shown.
That I can not judge.
You can compare this by writeln/debugln (unit LazLogger) the output to console (menu View > Debug windows > console output)


There is also a possibility that gdb (used by the IDE) has problems. Unfortunately that sometimes happens.
Check your setup https://wiki.lazarus.freepascal.org/Debugger_Setup


2.0.8 has a beta of a gdb replacement debugger called "fpdebug".
I am not sure if the package is installed.
Check under Tools>Options > Debugger > general: In the dropdown "debugger type" for an entry "fpdbug internal dwarf debugger (beta)" and select it.
If it is not present: menu: package > install/uninstall packages => add the package "LazDebuggerFp"

Frogfather

  • Jr. Member
  • **
  • Posts: 55
Hi Martin,

Tried fpdebug and that has resolved the issue. Many thanks!
 :)

 

TinyPortal © 2005-2018