PhpStorm 2017.1 Help

Stepping Through the Program

In this section:

Introduction

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 Run 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:

Suppressing stepping into

You can create a list of scripts, methods, and functions that you want the debugger skip while stepping through the program.

  1. Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or PhpStorm | Preferences for macOS. Expand the Buld, Execution, Deployment node, and then click page_name under Debugger.
  2. On the Stepping page that opens:
    • To have the debugger skip all library scripts, select the Do now step into library scripts check box.
    • To suppress stepping into some specific scripts, select the Do not step into scripts check box and create a list of such scripts using the toolbar buttons.
  3. To have some PHP methods skipped, specify them on the Step Filters page:
    1. Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or PhpStorm | Preferences for macOS. click Step Filters under Debug.
    2. On the Step Filters page that opens, select the check boxes next to the relevant method types: Magic methods and Constructors.
    3. If necessary, add specific methods to the Skipped Methods list using the /help/img/idea/2017.1/new.png toolbar button.

Tips and tricks

  • The Force Step Into command /help/img/idea/2017.1/frames_step_into.png 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 /help/img/idea/2017.1/force_step_over.png enables you to jump over the method call ignoring the breakpoints on the way.
  • The Force Run to Cursor command /help/img/idea/2017.1/frames_run_to_cursor.png enables you to jump to the cursor position ignoring existing breakpoints on the way.

See Also

Concepts:

Last modified: 19 July 2017