Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: buaawangjun on July 15, 2011, 03:41:33 pm
-
Hello everyone,
I try to debug a console application, and it can be compiled and linked successfully,
but when it starts to run in debug mode,
the console window will be open and closed quickly.
And then the application exits with the following print:
"Debugger name and version: GNU gdb 6.8.
Child process PID: 3968.
Program exited with code 03.
Debugger finished with status 0"
I try to set break point in the 1st line in main function,
but it can be broken at the point,
seems that main function cannot be excuted in the whole process.
The project seems to be OK, and can be debugged sucessfully in others PC (WinXP).
Even before, it was OK and can be debugged in my PC (WinXP).
I don't know what is happened about this issue.
Thank all of you.
-
Anybody who can help me ?
Thanks a lot.
-
Did you compile it with the debug target?
If yes, I can suggest you to verify that flags are correctly set (no optimizations, and set the debug option (don't remember what is it exactly, but it's really explicit) in you project.
-
Please read this: http://wiki.codeblocks.org/index.php?title=Debugging_with_Code::Blocks
You can update your GDB, newer GDB sometimes work better.
Also try to debug the program using GDB from the command line, thus you can pinpoint if the problem is in GDB or C::B.