(Tutorial) Debugging C/C++ Projects Tutorial
Tutorial : Debugging C/C++ Projects Tutorial
Creating the Sample Project
The NetBeans C/C++ Pack 6.5 uses the gdb debugger and provides numerous features for debugging your projects. To explore these features, we'll use the Quote project. If you have not already created this project, do the following:
1. Choose File > New Project.
2. In the project wizard, expand the Samples category and the C/C++ subcategory.
3. Select the Applications subcategory, then select the Quote project. Click Next, then click Finish.
Creating Breakpoints
You can create and manipulate breakpoints in your code at any time without starting a debugging session.
Creating and Removing a Line Breakpoint
1. In the Quote_1 project, open the quote.cc file.
2. Set a line breakpoint by clicking in the left margin of the Source Editor window next to line 173 (response = readChar("Enter disk module type: (S for single disks, R for RAID; Q - exit)", 'S');). The line is highlighted in red to indicate that the breakpoint is set.
3. You could remove the breakpoint by clicking on the icon in the left margin.
4. Choose Window > Debugging > Breakpoints to open the Breakpoints window. Your line breakpoint is listed in the window...
Courtesy:- Netbeans.org
- guru's blog
- Login or register to post comments

