Using Breakpoints

Breakpoints are markers that instruct the Zend Platform's Studio Server Component to stop the PHP/Zend Engine at a specified line of code. This feature helps you isolate areas of an application that require testing.

Use breakpoints to stop an application from running to allow you to review information such as Variables, Watches, Stack, and Debugging Messages.

Use breakpoints to section the program to allow you to test smaller, more manageable blocks of code.

   

Every breakpoint created appears in the Breakpoint tab. The Breakpoint tab lists the breakpoint file location. This includes file path, file name and line number. In addition, the icons indicate whether the breakpoint is Enabled or Disabled.

 

To add a Breakpoint:

  1. Stand on the relevant line of code and click the line number.

  2. The line number will get a Green background indicating that a Breakpoint has been added.
    You will also notice the breakpoint has been now added to the Debug Window's Breakpoints tab.  

 

Breakpoint status can be understood as follows:    

Enabled - An enabled breakpoint interrupts the execution of the application at the point in which it is placed.

Disabled - A disabled breakpoint remains in the project and is displayed in the Edit Window. However, it will not interrupt the execution of the application at the point in which it is placed.  

To Enable/Disable All Breakpoints:

  1. Go to the Breakpoints Tab

  2. Make sure that no breakpoint is selected and open the right-Click menu.
    The menu options are:
    - Remove All - Permanently delete all bookmarks.
    - Enable All &endash; Activate all Bookmarks.
    - Disable All &endash; Deactivate All Bookmarks

 

To edit and modify a single Bookmark:

  1. Go to the Breakpoints Tab

  2. Select a Bookmark and open the right-Click menu
    The menu options are:
    - Remove - Permanently deletes the bookmark.
    - Enable &endash; Activates the Bookmark.
    - Disable &endash; Deactivates the Bookmark
    - Goto Source - Jumps to the Bookmark in the code
    - Edit Condition

You can also select multiple Bookmarks from the list using CTRL, however the right-click menu changes to allow the remove, disable and enable options.

 

 

Related Links

Related Links:
Controlling Program Flow

Conditional Breakpoints

Debugging

Internal Debugger

Controlling Program Flow

Monitoring Program State

Communication Tunnel