Recent

Author Topic: [SOLVED] IDE design-time package debugging  (Read 354 times)

y.ivanov

  • Sr. Member
  • ****
  • Posts: 443
[SOLVED] IDE design-time package debugging
« on: July 05, 2022, 05:19:59 pm »
I'm trying to write a design time package for the Lazarus IDE and following the: https://wiki.lazarus.freepascal.org/Extending_the_IDE#Debugging_the_IDE I'm facing difficulties right from the start.
The problem is I have built IDE with the "Debug IDE" profile (-gw3 -gl -gh -gt -Co -Cr -Ci -Sa), loaded lazarus.lpi and then started it. However, I can't set breakpoints anywhere else but in lazarus.pp file. There is no "blue dots" in any other file, neither into my sources, nor other files in lazarus.lpi project.

What I have done wrong?

Lazarus 2.2.2 (rev lazarus_2_2_2) FPC 3.2.2 i386-win32-win32/win64
Windows7, 32-bit
Debugger backend: FpDebug
« Last Edit: July 05, 2022, 08:06:42 pm by y.ivanov »
"I'm sorry Dave, I'm afraid I can't do that."
—HAL 9000

GetMem

  • Hero Member
  • *****
  • Posts: 3762
Re: IDE design-time package debugging
« Reply #1 on: July 05, 2022, 05:42:52 pm »
Hi y.ivanov,

Please add $(IDEBuildOptions) to "Custom Options" of the package.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8100
  • Debugger - SynEdit - and more
    • wiki
Re: IDE design-time package debugging
« Reply #2 on: July 05, 2022, 05:52:37 pm »
You should have debug info in all the ide/* files, as well as many of the included packages (LCL, ...).
Maybe try to check "clean all" and rebuild?

It can happen that while you compile the lazarus.exe is locked by the running IDE.
In that case your newly build lazarus is called lazarus.new.exe => and will be renamed when you restart the IDE.

After the rebuild check the date/time on the lazarus.exe.

If you have more than one lazarus install dir involved the windows task manager has "properties" in the context menu, and you can check from which path lazarus.exe was started (make a note of the pid of the running IDE before debugging, and then the new pid is in the debugger)



For your own design time package, you need to go to your packages "Options" (in the toolbar of the package window).
- You can either set the flags in the "debugging" page of the Options.
- Or you can go to "custom options" of the option and add
Code: Text  [Select][+][-]
  1. $(IDEBuildOptions)

Note, that line is also configured in packages like the LCL..., and it means all the options from the "Configure build Lazarus" dialog.



y.ivanov

  • Sr. Member
  • ****
  • Posts: 443
Re: IDE design-time package debugging
« Reply #3 on: July 05, 2022, 06:32:04 pm »
Thanks Martin_fr, GetMem!

Package custom opts = $(IDEBuildOptions), Clean All, Build, all that helped. Now I have line debug info.
Now the easy part follows :)
"I'm sorry Dave, I'm afraid I can't do that."
—HAL 9000

 

TinyPortal © 2005-2018