[SOLVED] How can i debug the code in an IDE?

Hi again and thank you for your time.

I can compile a new project perfectly in Netbeans, but when I put a breakpoint for debug, the code not stop there. Why?


Have you seen this tutorial “NetBeans IDE: Debugging C/C++ Projects Tutorial” netbeans.org/kb/docs/cnd/debugging.html ?

Also, make sure that you compile your project with -g option, otherwise the debugger won’t be able to stop on a breakpoint.

Please see: “GCC: Options for Debugging Your Program” -> gcc.gnu.org/onlinedocs/gcc/Debu … tions.html

You are my hero :smiley:

If I add “-ggdb” at the end of the makefile g++ commmand, it works! :sunglasses:

[color=#0000FF]g++ -o MyGame.cpp -O3 -I$(URHO3D_INCLUDE_DIR) -I$(3RD_PARTY_INCLUDE_DIR) -L$(LIB_DIR) -lUrho3D -ggdb[/color]