Forum > Debugger

fpdebug library

(1/2) > >>


I'd like to use fpdebug with the new Lazarus 2.2 as on my system its performance is about a factor of 4 better.

However, I cannot get it to work with a library. It doesn't stop on breakpoints there. Is there something special one should know about when debugging libraries? Or can't it be done at all?

If you are talking about packages you'll have to choose the appropriate type of debug info in package settings (I use Dwarf3 as recommended by Martin_fr). Other than with projects the IDE doesn't issue a warning here.

Unfortunately libraries (dll, so) are not yet supported in the release 2.2. Work is in progress, in git main.

For this the IDE still supports the gdb based debugging.
Both debuggers should be configured in the IDE. You can choose a debugger in the project settings, so you do not need to toggle the global options all the time.

Simply for any project with libraries, switch the project settings to gdb.

Okay, thank you for the information. It's not a problem as gdb works quite well, just not as fast as fpdebug.

You can use the LazFpdServerDebugger component. That one works with libraries. (See this post)

It is based on FpDebug combined with some new concepts.

And library debugging with Lazarus and GDB has one flaw: it will not stop on exceptions within the library. FpdServer (which is used by LazFpdServerDebugger in the background) has the same flaw, but I do have a rudimentary fix for it. When you are interested I can help you with it.


[0] Message Index

[#] Next page

Go to full version