User forums > Help

Can't debug with CodeBlocks

(1/4) > >>

realruntime:
Hello,
       I tried to debug using CodeBlocks but I didn't know how and I didn't find any resource to debug with gdb.
Thanks,
Mustafa ELBanna

rickg22:
Um... currently it's a bit complicated. See, the debug button just runs the program unless you have set breakpoints before.

This is fixed in CVS, where you can just advance one line and start debugging from there.

Anyway, to debug your program in codeblocks, make sure you compile with the "produce debugging symbols" option, and you can use the "run to this line" button to start debugging.

Good luck! :)

realruntime:
Hello,
       Thanks, But I did this before I post and it didn't work. after choosing produce debugging symbols option. then try to make a break poing and debug using gdb, this message appears The project/Target has no debugging info. Please change this in the project's build options and retry...
        Waiting for help.
Thanks,
Mustafa ELBanna

Urxae:

--- Quote from: realruntime on August 29, 2005, 10:11:56 am ---Hello,
       Thanks, But I did this before I post and it didn't work. after choosing produce debugging symbols option. then try to make a break poing and debug using gdb, this message appears The project/Target has no debugging info. Please change this in the project's build options and retry...
        Waiting for help.

--- End quote ---
Did you recompile (ie Compile -> Rebuild or just Ctrl-F11) after setting that option? Just setting it doesn't magically add debugging symbols to already compiled binaries, I'm afraid ;).

Maybe that message should be clearer about what "retry" in this case is, as it isn't just trying to debug again.

realruntime:
Hello,
      I sure rebuild the app. after changing the option but it doesn't really works and the message appears again. and the GDB debugger generate this message:
"No symbol table is loaded.  Use the "file" command.
error"
Thanks,
Mustafa ELBanna

Navigation

[0] Message Index

[#] Next page

Go to full version