Page 1 of 2

help in debugging plz

Posted: Fri Aug 31, 2012 2:43 pm
by khfree0
hi all :)

i am new to c++ development,i used codeblocks but when i saw codelite i got :shock:

i like it,but there's a small problem i can't find a solution on the net

when i come to debug,i set the break-points,and start debugging
but nothing happen,the program just complete it's execution without any stops at any break point

i can't figure out what is this because i am soo new to this,so can anybody tell me what to do ?

Re: help in debugging plz

Posted: Fri Aug 31, 2012 2:50 pm
by eranif
1) Please provide more information - as described here
http://forums.codelite.org/viewtopic.php?f=3&t=804

2) Try un-checking this option:
"Settings -> Debugger Settings -> GNU Gdb Debugger -> Apply breakpoints after main function is hit"

Eran

Re: help in debugging plz

Posted: Fri Aug 31, 2012 7:26 pm
by khfree0
ok Eran
my OS is windows 7,latest version of codelite is installed ...

i found the "apply break points after main function is hit" is checked

but the Debugger path i empty :S
is it the problem,and how can i fix it step by step plz as i have no experience in this at all ?? :|

Re: help in debugging plz

Posted: Fri Aug 31, 2012 7:31 pm
by eranif
eranif wrote:1) Please provide more information - as described here
http://forums.codelite.org/viewtopic.php?f=3&t=804
You still did not provide the entire information we need for properly helping you:

- Did you compile your source?
- Which package of codelite did you install? I need the *exact* name
- Where is your debugger log?

Tip:
If the debugger "View" is closed, simply go to "Perspective -> Debug" and paste here the content of the "Output" tab of the "Debugger" pane

Eran

Re: help in debugging plz

Posted: Fri Aug 31, 2012 7:37 pm
by khfree0
eranif wrote:
eranif wrote:1) Please provide more information - as described here
http://forums.codelite.org/viewtopic.php?f=3&t=804
You still did not provide the entire information we need for properly helping you:

- Did you compile your source?
- Which package of codelite did you install? I need the *exact* name
- Where is your debugger log?

Tip:
If the debugger "View" is closed, simply go to "Perspective -> Debug" and paste here the content of the "Output" tab of the "Debugger" pane

Eran
i just downloaded this "codelite-4.1.5770-mingw4.6.1.exe",run->next,next...then i run the ide and it works good

i did nothing else,tell me if there's something else i should do plz :)

Re: help in debugging plz

Posted: Fri Aug 31, 2012 7:38 pm
by eranif
Please post here the build log + the debugging log - without it I can't help you

Eran

Re: help in debugging plz

Posted: Fri Aug 31, 2012 7:40 pm
by khfree0
----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe" -e -j 2 -f "dummy_wsp.mk""
----------Building project:[ dummy - Release ]----------
mingw32-make.exe[1]: Entering directory `C:/Users/khaled/Desktop/dummy/dummy'
g++ -o ./Release/dummy @"C:\Users\khaled\Desktop\dummy\dummy\dummy.txt" -L.
mingw32-make.exe[1]: Leaving directory `C:/Users/khaled/Desktop/dummy/dummy'
----------Build Ended----------
0 errors, 0 warnings


is this the build log u mean ?

Re: help in debugging plz

Posted: Fri Aug 31, 2012 7:41 pm
by khfree0
Using gdbinit file: C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\Users\khaled\Desktop\dummy\dummy
Launching gdb from : ./Release
Starting debugger : C:\MinGW-4.6.1 --command="C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "./dummy"
Failed to initialize debugger: C:\MinGW-4.6.1
Using gdbinit file: C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\Users\khaled\Desktop\dummy\dummy
Launching gdb from : ./Release
Starting debugger : C:\MinGW-4.6.1 --command="C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "./dummy"
Failed to initialize debugger: C:\MinGW-4.6.1
Using gdbinit file: C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\Users\khaled\Desktop\dummy\dummy
Launching gdb from : ./Release
Starting debugger : C:\MinGW-4.6.1 --command="C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "./dummy"
Failed to initialize debugger: C:\MinGW-4.6.1
Using gdbinit file: C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\Users\khaled\Desktop\dummy\dummy
Launching gdb from : ./Release
Starting debugger : C:\Program Files (x86)\CodeLite\debuggers\DebuggerGDB.dll --command="C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "./dummy"
Failed to initialize debugger: C:\Program Files (x86)\CodeLite\debuggers\DebuggerGDB.dll
Using gdbinit file: C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\Users\khaled\Desktop\dummy\dummy
Launching gdb from : ./Release
Starting debugger : C:\Program Files (x86)\CodeLite\debuggers\DebuggerGDB.dll --command="C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "./dummy"
Failed to initialize debugger: C:\Program Files (x86)\CodeLite\debuggers\DebuggerGDB.dll
Using gdbinit file: C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt
Current working dir: C:\Users\khaled\Desktop\dummy\dummy
Launching gdb from : ./Release
Starting debugger : gdb --command="C:\Users\khaled\AppData\Local\Temp\codelite_gdbinit.txt" --interpreter=mi "./dummy"
Debug session started successfully!
GNU gdb (GDB) 7.0
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from C:\Users\khaled\Desktop\dummy\dummy\Release/./dummy.exe...
done.
>> Debuggee process ID: 1036
[New Thread 1036.0x1630]
Continuing...
Internal breakpoint was hit (id=1), Applying user breakpoints and continuing
Breakpoint creation unsuccessful
Continuing...
Program exited normally.
Debug session ended


and this the debugging log ?

Re: help in debugging plz

Posted: Fri Aug 31, 2012 9:03 pm
by eranif
Thanks, now that I see the log, I can tell you why debugging is failing:
You are building "Release" instead of "Debug" configuration.

At the top of the workspace view there is a little drop-down control, please select the "Debug" build configuration and rebuild your workspace

Eran

Re: help in debugging plz

Posted: Fri Aug 31, 2012 9:28 pm
by khfree0
ok,thanks Eran ,it worked :)

isn't there any tutorial for showing how to use codelite on youtube like others do ?