Stepping Through the Program
In this section:
When a breakpoint is reached the Debug tool window becomes active and enables you to get control over the program's execution. For this purpose, you can use the menu commands, or the icons on the stepping toolbar of in the Debug tool window.
Each stepping action advances the execution point to the next execution location, depending on the action you choose.
Stepping through the program
Do one of the following:
- On the main menu, choose Run | <stepping command>
- Use the keyboard shortcuts.
- Use the buttons in the stepping toolbar of the Debug tool window.
Suppressing stepping into
You can create a list of scripts, methods, and functions that you want the debugger skip while stepping through the program.
- Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing for Windows and Linux or for OS X. Expand the Buld, Execution, Deployment node, and then click page_name under Debugger.
- On the Stepping page that opens:
To have some PHP methods skipped, specify them on the Step Filters page:
- Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing for Windows and Linux or for OS X. click Step Filters under Debug.
- On the Step Filters page that opens, select the check boxes next to the relevant method types: Magic methods and Constructors.
- If necessary, add specific methods to the Skipped Methods list using the toolbar button.
Tips and tricks
- The Force Step Into command enables you to step into
a method of a class not to be stepped into .
The classes, stepping into which is suppressed, are specified on the Stepping page of the Settings/Preferences dialog box.
- The Force Step Over command enables you to jump over the method call ignoring the breakpoints on the way.
- The Force Run to Cursor command enables you to jump to the cursor position ignoring existing breakpoints on the way.