How to debug codelite

Discussion about CodeLite development process and patches
User avatar
Rosch
CodeLite Enthusiast
Posts: 24
Joined: Fri Nov 02, 2012 4:28 pm
Genuine User: Yes
IDE Question: C++
Location: Germany
Contact:

How to debug codelite

Post 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
scottfuz
CodeLite Curious
Posts: 8
Joined: Thu Nov 01, 2012 2:27 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to debug codelite

Post 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.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to debug codelite

Post 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
Make sure you have read the HOW TO POST thread
User avatar
Rosch
CodeLite Enthusiast
Posts: 24
Joined: Fri Nov 02, 2012 4:28 pm
Genuine User: Yes
IDE Question: C++
Location: Germany
Contact:

Re: How to debug codelite

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to debug codelite

Post by eranif »

Please use this post to provide more information:

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

Eran
Make sure you have read the HOW TO POST thread
User avatar
Rosch
CodeLite Enthusiast
Posts: 24
Joined: Fri Nov 02, 2012 4:28 pm
Genuine User: Yes
IDE Question: C++
Location: Germany
Contact:

Re: How to debug codelite

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to debug codelite

Post 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
Make sure you have read the HOW TO POST thread
Post Reply