Lazarus

Using the Lazarus IDE => General => Topic started by: RolfW on November 26, 2021, 12:09:25 pm

Title: How to debug the Lazarus IDE
Post by: RolfW on November 26, 2021, 12:09:25 pm
Hello,
can someone tell me how to debug the Lazarus IDE?
I want to debug the ProjTemplates package (coponents/projecttemplates) but I've no idea how to start and I didn't find any newer hints or even a more detailed one yet.

Thank you,
Rolf
Title: Re: How to debug the Lazarus IDE
Post by: JuhaManninen on November 26, 2021, 12:21:49 pm
can someone tell me how to debug the Lazarus IDE?
I want to debug the ProjTemplates package (coponents/projecttemplates) but I've no idea how to start and I didn't find any newer hints or even a more detailed one yet.
First build Lazarus IDE with debug info. It is the Debug IDE build profile in the Configure Build Lazarus dialog.
Then open the project ide/lazarus.lpi.
Press F9.
You will have 2 instances of the IDE windows. Place them so that you know which one belongs to which IDE instance.
Title: Re: How to debug the Lazarus IDE
Post by: Martin_fr on November 26, 2021, 12:25:11 pm
Tools > Configure Build IDE

If you use gdb add
  -gw -godwarfsets  -O-

If you use fpdebug add
   -gw3 -O-

Other options, as you like: -Criot -Sa  -gh

Rebuild the IDE.

The open from the install folder ide/lazarus.lpi
And hit Run / F9

---
Some packages do not follow the global settings, then
  $(IDEBuildOptions)
to the packages custom options
Title: Re: How to debug the Lazarus IDE
Post by: JuhaManninen on November 26, 2021, 12:46:01 pm
Some packages do not follow the global settings, then
  $(IDEBuildOptions)
to the packages custom options
The ProjTemplates package fortunately has it already.
TinyPortal © 2005-2018