Recent

Author Topic: How to debug the Lazarus IDE  (Read 2163 times)

RolfW

  • New Member
  • *
  • Posts: 13
How to debug the Lazarus IDE
« 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

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4051
  • I like bugs.
Re: How to debug the Lazarus IDE
« Reply #1 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.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7693
  • Debugger - SynEdit - and more
    • wiki
Re: How to debug the Lazarus IDE
« Reply #2 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

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4051
  • I like bugs.
Re: How to debug the Lazarus IDE
« Reply #3 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.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

 

TinyPortal © 2005-2018