Follow these steps to implement the example:
- Navigate to Window | Preferences.
- Expand the Java option in the left-hand side menu.
- Then, select the Debug option. The following screenshot illustrates the window:
- Change the value of Default suspend policy for new breakpoints from Suspend Thread to Suspend VM (marked in red in the screenshot).
- Click on the OK button to confirm the change.