Go to main content
Oracle® Developer Studio 12.5: IDE Quick Start Tutorial

Exit Print View

Updated: June 2016
 
 

Creating Breakpoints

You can create and manipulate breakpoints in your code at any time. In order to run the debugger, you must have breakpoints set in your code so the debugger knows where to pause execution so you can examine the values of variables, step through lines of code, and fix errors.

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 Editor window next to line 171 (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.

    image:Editor window showing line breakpoint
  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.

    image:Breakpoints window

Creating a Function Breakpoint

  1. Choose Debug > New Breakpoint (Ctrl+Shift+f8) to open the New Breakpoint dialog box.

  2. In the Breakpoint Type drop-down list, set the type to Function.

  3. Type the function name Customer::GetDiscount in the Function text field. Click OK.

    image:New Breakpoint dialog box
  4. Your function breakpoint is set and is added to the list in the Breakpoints window.

    image:Breakpoints window

Grouping Breakpoints

You can group breakpoints using several different categories such as per file, per project, by type, by language, etc.

  1. Choose Window > Debugging > Breakpoints window.

  2. Click the Select Breakpoint Groups icon.

  3. Select the breakpoint group.

    The breakpoints are arranged according to your selection.