Page 1 of 1

How to debug codelite

Posted: Fri Nov 02, 2012 4:45 pm
by Rosch
Hi...

I am just exploring CodeLite and start to like it. I have buildt codelite itself according to the guide but would like to debug CodeLite itself (on windows) as I plan to write maybe some extensions. What it is the way to do it?

I have buildt a debug version of it using "Win Debug Unicode" build configuration using mingw gcc. So far so good. But now how to debug it?
I believe I do have to have 2 instances of codelite. One in release mode for working on codelite and one to debug it. right?
Is there already some handy stuff to achieve this? What is the most efficient way to do it?

Thanks,

Roland

Re: How to debug codelite

Posted: Fri Nov 02, 2012 7:05 pm
by scottfuz
This might be useful to you...RMS's gdb Tutorial.
Its a good read on gdb debugging.
Also, Peter's gdb Tutorial:Table of Contents is a nice read on gdb basics.
I found both links very useful. Maybe they can help you too.

Re: How to debug codelite

Posted: Fri Nov 02, 2012 7:11 pm
by eranif
Install codelite - latest version

Next, change the configuration settings to 'Win_Debug_Unicode'
Open the LiteEditor.workspace hit F7 and wait for the compilation to complete (depends on your machine strength, this can take a while. my i7 16GB memory needs 3.5 minutes to build codelite with -j8)
Thats it!

To debug it - simply place breakpoints (F9) and hit F5 (debug start)
You don't need anything else, you use codelite to debug codelite (this is how I do it)

Eran

Re: How to debug codelite

Posted: Mon Nov 05, 2012 4:33 pm
by Rosch
Hi Eran,
eranif wrote:Install codelite - latest version

Next, change the configuration settings to 'Win_Debug_Unicode'
Open the LiteEditor.workspace hit F7 and wait for the compilation to complete (depends on your machine strength, this can take a while. my i7 16GB memory needs 3.5 minutes to build codelite with -j8)
Thats it!

To debug it - simply place breakpoints (F9) and hit F5 (debug start)
You don't need anything else, you use codelite to debug codelite (this is how I do it)

Eran
This is exactly what I did. It is not working it is building. When I press F5 nothing happens...
I will try again and do a fresh rebuild with current SVN sources.

Roland

Re: How to debug codelite

Posted: Mon Nov 05, 2012 4:42 pm
by eranif
Please use this post to provide more information:

http://forums.codelite.org/viewtopic.php?f=3&t=804

Eran

Re: How to debug codelite

Posted: Thu Nov 08, 2012 7:06 pm
by Rosch
The reason why it was not starting on my side was the missing file you have added. Thanks!
It was a pitty that I did not see the make error before, but it was completely scrolled out.
(see: http://forums.codelite.org/viewtopic.php?f=13&t=1907).

Build process came out with 0 errors, while indeed there had been make errors.
Make errors should IMHO be caught be codelite.

My debug codelite now starts up but takes about 3 minutes until I see the Ui while the release codelite starts up in about 10 seconds.
While startup it slowly grows (in memoryconsumption) while the cpus of the whole system are idle most of the time.
Any tricks to speed this up?

Thanks,

Roland

Re: How to debug codelite

Posted: Thu Nov 08, 2012 7:45 pm
by eranif
Rosch wrote:Any tricks to speed this up?
For me it starts in < 5 seconds (but again, It depends on the machine you are using)

It really depends on your setup. MinGW is slow when it comes to debug on Windows.

I can give you the following tips:
- Don't place breakpoints until codelite it up and running (gdb seems to be very slow when it comes to load with breakpoints)
- Use another gdb http://qp-gcc.googlecode.com/files/gdb2012-08-17.zip - note that this gdb requires python 2.7 installed on your machine

Eran