I have an c++ application developed using gcc(4.1) and compiled with CMAKE MakeFiles . The Code is large in size and debugging it is tough. I dont know how to debug the code line by line using cmake Utility. Any idea how to do it?
Thanks in advance 🙂 .
CMake is a system to enhance the definition of makefiles (it is a meta system that creates platform specific makefiles). It is not a debugger. You can use gdb for debugging.
To ensure your program is compiled for debugging properly, make sure the flags passed to gcc include
-O0, which means no-optimizations, and-gfor debugging information,or
-ggdbto produce a format that suits gdb really well (see also http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html).