2.3. Integrated Development Environments¶
Most students find programming easier to learn when they use an integrated development environment (IDE). An IDE provides an editor designed for programming and tools to compile, run, and debug programs.
Several IDE’s are available for programming C code. The following have been used for this class.
- Microsoft Visual Studio has so many features that it is difficult for beginners. It is also not free.
- A program jGrasp is free and easy to use, but it is really intended for use with Java and thus, the debugging capability is lacking for C programs. It can also be harder to install since the C compiler is installed separate from the IDE.
- This semester, we will try Code Blocks. A single download from http://www.codeblocks.org will install both the IDE and C compiler. For Windows based computers, download the codeblocks-xx.xxmingw-setup.exe file, xx.xx is for the version number.
2.3.1. Using the Debugger¶
The gdb source code debugger is integrated into Code Blocks. The graphical interface makes it easy to set breakpoints to stop the program at certain points, examine variables and step through your program. Search the Internet for tutorials on using gdb debugger with Code Blocks.
Native gdb commands may also be used. The commands are fairly simple. A summary of the commands may be found on this web page.