You can either manually add a breakpoint to your code, or you can add an exception breakpoint to your code.
Manually adding a breakpoint to your code
- Start the debugger and switch to the Debug perspective. (See Running the debugger if you need help.)
- In the Debug View, select the thread that you want to suspend.
- Add a breakpoint to your code.
- In the Editor or Outline View, navigate to the point in your code where you want to add a breakpoint.
- In the gray left margin of the Editor, double-click or right-click and select Toggle Breakpoint from the context menu (shown below).
- Click the Resume button to resume the execution of your code. Your code will be suspended again when execution hits the breakpoint that you set up.
Adding an exception breakpoint to your code
To add a breakpoint to your code so that execution automatically breaks on a certain type of exception:
- Open the file with your script in the appropriate Editor.
- Run the debugger (see Running the debugger) to debug your code.