Lazarus

Programming => General => Topic started by: snorkel on March 21, 2013, 05:38:19 pm

Title: Debug into FPC source?
Post by: snorkel on March 21, 2013, 05:38:19 pm
Hi,
Is it possible to debug into the FPC source?
I.E.  if I put a breakpoint in the DB unit for example, it never stops and I can even
change a method name to force a error and nothing happens?

In Delphi I could debug into the VCL source, is there a way to do that in Lazarus with the FCL source?
Title: Re: Debug into FPC source?
Post by: Leledumbo on March 21, 2013, 05:54:21 pm
Quote
Is it possible to debug into the FPC source?
Yes, rebuild the unit(s) with debug info.
Title: Re: Debug into FPC source?
Post by: Martin_fr on March 21, 2013, 07:41:55 pm
The FPC install in lazarus is pre build (rtl/ fpc-packages). The IDE does never rebuild them.

To rebuild them you need the fpc makefiles (which aren't included in the Lazarus installer (at least not the one for windows)

You need to download an fpc source distribution, and rebuild yourself.
    google "fpc buildfaq"
and read it.

Another option is to make a copy of the one package (from the fpc sources that come with lazarus).
Create a lazarus package, and use that.
Title: Re: Debug into FPC source?
Post by: BigChimp on March 21, 2013, 09:35:43 pm
What Martin said, or use e.g. fpcup to build install a separate copy of fpc+Lazarus. Pass --fpcopt="-g -gl" and --lazopt="-g -gl" (or whatever debug options you want; please fpcup --help for details)

:)

Link: see bitbucket site, see fpcup repository, download
Title: Re: Debug into FPC source?
Post by: Leledumbo on March 22, 2013, 10:04:23 am
Quote
To rebuild them you need the fpc makefiles (which aren't included in the Lazarus installer (at least not the one for windows)
AFAIR it's there, but not in single makefile for both rtl and packages. There's one inside each directory.