User forums > Help
Debugging with C::B
qwerty:
Hi,
Please help a newbe. I am not just a newbe C::B user, but also relatively new to programming - being a die hard hardware guy who eventually realized some need for occasional coding. So, have a mercy, don’t lash me out to hard.
I have used C::B 1.0rc2 for few weeks initially, and tonight moved to the nightly build Feb. 11 2007 – wx2.6.3 (Windows, Unicode), which appeared to be a huge step forward.
Though, I have a problem debugging my code which I didn’t have on the 1.0rc2. When I set a break point, and start the debugger, nothing really happens. It doesn’t even open a console widow (my code is a console application).
Debugger messages:
Building to ensure sources are up-to-date
Build succeeded
Selecting target: default
Adding source dir: C:\mypath\mycodedirectory_v1.0.0\
Adding source dir: C:\mypath\mycodedirectory_v1.0.0\
Adding file: exe_folder\mycode_v1.0.0.exe
Starting debugger: done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
I suspect some sort of installation problem, but don’t know where to look.
Appreciate your help. Thanks,
qwerty
Pecan:
//-- Please Provide more information
Would you state your CodeBlocks and compiler version, and your Operating System.
Also state your wxWidgets version if you're using one.
If you're running linux, the debugger does not yet provided a console for a console application. There is a patch pending for this however. Maybe it'll be applied sometime soon.
For the time being, you can use a program called "cgdb" to debug your linux console app. If you're running ubuntu, synaptic will install it for you.
Else google it.
qwerty:
OS: Widows XP
C::B: CB_20070211_rev3592_win32
wxWidgets: wxmsw26u_gcc_cb_wx2.6.3p2 patched with
wxmsw26u_gcc_cb_wx2.6.3p2AndCbPatch_version3
Compiler: MinGW GCC 3.4.5 manually installed
Debugger: gdb-6.3-2
Thanks,
qwerty
Pecan:
--- Quote from: qwerty on February 12, 2007, 05:55:37 pm ---OS: Widows XP
C::B: CB_20070211_rev3592_win32
wxWidgets: wxmsw26u_gcc_cb_wx2.6.3p2 patched with
wxmsw26u_gcc_cb_wx2.6.3p2AndCbPatch_version3
Compiler: MinGW GCC 3.4.5 manually installed
Debugger: gdb-6.3-2
Thanks,
qwerty
--- End quote ---
Would you look at the following, try it, and tell us where it fails for you.
//-- Debugging
Debugging with CodeBlocks
http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/codeblocks-instructions.pdf
Biplab:
In brief, it works. I see the Console.
Using C::B Rev 3589, Win XP SP2, GCC-3.4.5, GDB-6.3. I'm posting a log. The program has 3 variables. 2 stores some predefined values and 3rd one stores sum of others.
--- Quote ---Building to ensure sources are up-to-date
Build succeeded
Selecting target: Debug
Adding source dir: C:\Projects\Test\
Adding source dir: C:\Projects\Test\
Adding file: .\Test.exe
Starting debugger: done
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.3
At C:/Projects/Test/main.cpp:8
Continuing...
At C:/Projects/Test/main.cpp:9
Continuing...
At C:/Projects/Test/main.cpp:11
Continuing...
At C:/Projects/Test/main.cpp:12
Continuing...
Program exited normally.
Debugger finished with status 0
--- End quote ---
It's a simple Console app. :)
Navigation
[0] Message Index
[#] Next page
Go to full version