User forums > Using Code::Blocks

Debugging on the Fedora Core 6 Nov 11 version

(1/3) > >>

goetz:
This version of Codeblocks worked fine for compiling. However for debugging, the run to cursor did not work. Setting a breakpoint or running to a cursor position does not work properly. The debugger just sits there doing nothing. Instead of running to a line in the program right away, I needed to select the main function as the line to run to. Then I could have the program run to a new point in the program.

Lawrence

MortenMacFly:

--- Quote from: goetz on November 15, 2006, 10:31:46 pm ---Then I could have the program run to a new point in the program.

--- End quote ---
...please search the forum before posting. There are basically (usually) 3 reasons for this:
1.) you forgot to compile with the debugger switch (-g)
2.) you did not *re*compile the project after setting this switch
3.) you are using a debugger that is not supported by C::B (only gdb and cdb are)
I bet one of these is the root of your problem.
With regards, Morten.

goetz:
Thanks for helping.

goetz:
I tried what you suggested. I setup the debugging flags, I did a clean and rebuild, and I am using the gdb debugger. If I run to a line that uses cout, it runs to it, but when I go to the next line, no output window opens. If I run to a cursor that is an assignment line, such as i=10, the debugger says:

Debugger name and version: GNU gdb Red Hat Linux (6.5-13.fc6rh)
Program exited normally.
Debugger finished with status 0

Thanks for any help,

Lawrence

stahta01:
Turn off ALL optimization; I am not knowledgeable about GCC debugger, but it sounds like you are trying to debug code that the compiler is removing.

Tim S

Navigation

[0] Message Index

[#] Next page

Go to full version