Recent

Author Topic: [Solved] Is it possible to debug step by step with Lazarus + fpGUI ?  (Read 5032 times)

devEric69

  • Hero Member
  • *****
  • Posts: 648
Hello,

I'm starting with fpGUI. I was able to load and compile a fpGUI's project in Lazarus IDE. I can create the targeted application for x11. I see the interface drawn with the x11 widgets. I manage to create a DEBUG mode in Lazarus IDE. I manage to launch and run in this DEBUG mode. And I can set a breakpoint.

But... the application never stops at this breakpoint :( . Do I have to look further in my IDE's configuration, or can't fpGUI targeted applications be debugged step by step?
« Last Edit: August 19, 2020, 06:45:38 pm by devEric69 »
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10305
  • Debugger - SynEdit - and more
    • wiki
Re: Is it possible to debug step by step with Lazarus + fpGUI ?
« Reply #1 on: August 19, 2020, 06:12:37 pm »
That is  odd. Debugger should not be affected by what code you include...

Usual suspects:

-O-  (at max -O1, but really better NO optimization)  (though breakpoints often work at higher opt)

No Smart linking.

No Inlining.
Warning, if a method has the "inline" modifier, then even at -O- it will be inlined. Use {$INLINE off} at the top of the unit.

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: Is it possible to debug step by step with Lazarus + fpGUI ?
« Reply #2 on: August 19, 2020, 06:44:44 pm »
Quote
That is  odd. Debugger should not be affected by what code you include...

Indeed, I can now trace, step by step: I've just had to recompile the fpgui_toolkit.lpk package, with debugging options and information (necessary, because the window inherits from TfpgForm).
« Last Edit: August 19, 2020, 06:53:25 pm by devEric69 »
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

 

TinyPortal © 2005-2018