Types of Breakpoints
On this page:
PhpStorm lets you create breakpoints of several types. Each breakpoint type supported by PhpStorm addresses different debugging needs and has its own individual settings.
PhpStorm lets you create breakpoints of several types. Each breakpoint type supported by PhpStorm addresses different debugging needs and has its own individual settings. Depending on the context, PhpStorm distinguishes between the following types of breakpoints:
- PHP line breakpoints can be set in the PHP context inside
*.html, and files of other types.
- PHP exception breakpoints
These breakpoints are assigned to lines of source code and are used to target a particular section for debugging.
Line breakpoints are triggered when the program reaches the specified line of source code, before it is executed. The line of code that contains a set breakpoint, is marked with a red stripe; once such line of code is reached, the marking stripe changes to blue .
If a file with breakpoints has been modified externally, for example, updated from a version control repository, or changed in an external editor, so that line numbers are changed, then the breakpoints will be moved accordingly. Note that PhpStorm should be running at the moment of such modification; otherwise, such changes will pass unnoticed.
Temporary Line breakpoint
These breakpoints are assigned to lines of source code and are used to target a particular section for debugging. When hit, such breakpoints are immediately removed.
Exception breakpoints are triggered when the specified exception is thrown. Unlike the line breakpoints, which require specific source references, exception breakpoints apply globally to the exception condition, rather than to a particular code reference.
With PHP Exception Breakpoints, you can initiate the debugger at the start of the script and break on your own breakpoints or whenever an error or Exception of a given type occurs. PHP Exception breakpoints do not require configuring Xdebug for working in the Just-In-Time mode by setting
jit, see Debugging in the Just-In-Time Mode for details.