Forum > General

How to debug the Lazarus IDE

(1/1)

RolfW:
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

JuhaManninen:

--- Quote from: RolfW on November 26, 2021, 12:09:25 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.

--- End quote ---
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.

Martin_fr:
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

JuhaManninen:

--- Quote from: Martin_fr on November 26, 2021, 12:25:11 pm ---Some packages do not follow the global settings, then
  $(IDEBuildOptions)
to the packages custom options

--- End quote ---
The ProjTemplates package fortunately has it already.

Navigation

[0] Message Index

Go to full version