In PhpStorm, breakpoints are assigned to the lines of source code and point at particular sections for debugging.
Depending on the context, PhpStorm distinguishes between the following types of breakpoints:
- PHP breakpoints can be set in the PHP context inside *.php, *.html, and files of other types.
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.
Once set, a breakpoint remains in project until removed. Breakpoints can only be set on executable lines of code. Comments, declarations of methods, and empty lines are not valid locations for breakpoints.
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.
It is important to note that PhpStorm should be running at the moment of such modification; otherwise, such changes will pass unnoticed.
In this section:
Temporary line breakpoints
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.