# R Method Breakpoints

First, the name 'method' is originate from Eclipse and means in the context of R all functions, not only methods like S4 methods. Method breakpoints are always associated with a functions and allows to suspend the execution thread at the entry and exit of it. Each positions can be enabled and disabled separately, its settings are indicated in the icons by and right arrow at the top () for the function entry and an left arrow at the bottom () for the function exit.

#### Adding Method Breakpoints

To create a new method breakpoint, open the file in a the source editor and:

- By using the Toggle Method Breakpoint command:
  1. Set the cursor inside at any position inside the definition of the function the breakpoint should be associated to.
  2. Trigger the command Toggle Method Breakpoint.
  This way ensures that a method breakpoint and not another type is created.
- Use the action Toggle Breakpoint in the context menu of the editor ruler in a line of the function header. You can also double-click on the editor ruler to execute this command.
- By using the common Toggle Breakpoint command:
  1. Set the cursor inside the header of the function the breakpoint should be associated to.
  2. Trigger the common command Toggle Breakpoint.
  The keyboard shortcut `Ctrl+Shift+B` is associated by default to this command.

#### Removing Method Breakpoints

Since the ways to create a method breakpoint described above are toggle operation, you can also use them again to remove the method breakpoint. Beside that, the Breakpoint view offers additional actions to remove the selected or all breakpoints.

#### Changing the Settings for the Entry / Exit Property

The entry and exit position for a method breakpoint can be enabled and disabled in the Breakpoint view.

1. Select the breakpoint to change.
   The Breakpoint view shows properties supported by the selected breakpoint in the detail pane below or beside the breakpoints list.
2. Use the checkboxes Entry and Exit to enable or disable the positions.