PHP Breakpoints in the IDE

See Also

A breakpoint is a flag in the source code that tells the debugger to stop execution of the program. When your program stops on a breakpoint, you can perform actions like examining the value of variables and single-stepping through your program.

Setting Breakpoints

Set a breakpoint for a line in your PHP code. To set a breakpoint, left-click the left margin or line number of the line. To remove the breakpoint, left-click the breakpoint icon.

The Source Editor indicates a line breakpoint by highlighting the line at which the breakpoint is set in red and placing an annotation in the left margin. The following table describes the debugging annotations.

Annotation Description
Breakpoint iconBreakpoint
Disabled breakpoint icon groupDisabled breakpoint
Invalid breakpoint icon groupInvalid breakpoint
Program counter iconProgram counter
Program counter and one breakpoint icon Program counter and one breakpoint
Call siteThe call site or place in the source code from which the current call on the call stack was made
Running threadSuspended threads
Thread suspended by breakpointThread suspended by hitting a breakpoint

You can view and organize all IDE breakpoints by choosing Windows > Debugging > Breakpoints (Alt-Shift-5).

Organizing Breakpoints Into a Group

The Breakpoints window lists all of the breakpoints defined for all of your IDE projects. If you have numerous breakpoints set in the IDE, it is useful to organize these breakpoints into groups. Once your breakpoints are placed into groups, you can enable, disable, and delete them as a single unit.

To add a breakpoint to a custom group:

  1. Choose Windows > Debugging > Breakpoints (Alt-Shift-5) to open the Breakpoints window.
  2. Right-click the breakpoint and choose Move Into Group and select a custom group from the list.

To remove a breakpoint from a custom group:

See Also
About Debugging PHP Applications

Legal Notices