[Lazarus] Debug Lazarus source
Juha Manninen
juha.manninen at phnet.fi
Fri Nov 6 15:49:19 CET 2009
Hi,
I don't know what happened here.
At one point I deleted all Lazarus setting files from ~.
Then I have reloaded the whole Lazarus source tree from SVN.
svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus
"Make clean all" worked fine but when compiling lazarus.lpi I get errors:
The project's compiler options has no compiler command.
In Project Compiler Options -> Compilation -> Compiler the 3 checkboxes are
unchecked: "Compile", "Build" and "Run".
I check them.
Trying to compile again:
lazarus.pp(37,2) Fatal: Can't open include file "ide.inc"
So, in Compiler Options -> Paths -> Include Files I set "include".
... Now it actually compiled many files, but then:
packagedefs.pas(60,65) Fatal: Can't find unit PackageDefs used by Project
The editor has unit file PackageDefs open when it gives the error, so it
actually found it.
I add ";../packager/" to Compiler Options -> Paths -> Other Unit Files.
I can see there is already "converter" added.
Now the project actually compiles and runs!
Then I try to set a breakpoint but get an error:
There is no debugger specified...
It mentions a debugger menu setting but I didn't even find it now.
Uhh! Maybe I will continue tomorrow. It worked yesterday so maybe it works
tomorrow again.
Juha Manninen
> > How do you people debug Lazarus source code when developing it?
> >
> > Yesterday I was able to open the whole Lazarus project
> > "lazarus/ide/lazarus.lpi" and debug it with Lazarus itself.
>
> Yes, that is one way.
>
> > I was already then wondering how does it find files under directories
> > like "converter" which are not defined anywhere, neither in Required
> > package contents nor in Compiler Options -> Paths.
>
> The IDE knows itself, so the lazarus.lpi is not really needed. I added
> the 'converter' path.
>
> The IDE knows its search paths.
> You can compile it via Tools / Build Lazarus. For myself I set a
> shortcut for that.
> You can debug it via lazarus.lpi + F9 or via starting the IDE in gdb.
>
> > Then I tested some options and screwed things up. I started again from
> > SVN copy of Lazarus.
> > Now I get many errors for lazarus.lpi about files not found. It must
> > have been a miracle that it worked earlier. Something a human being
> > can't explain...
>
> The IDE warns if a project file is missing. But I had not yet the time
> to show all missing files in one dialog - project inspector.
>
> > Lazarus wiki tells to use ddd for debugging. That is quite masochistic.
> > Even the font is so ugly I have trouble reading it.
>
> ;)
>
> > So, how to configure Lazarus to debug itself?
>
> see above
>
> Mattias
More information about the Lazarus
mailing list