There is new information for your brain to absorb. Until this point in time, you assumed that a breakpoint can be created only manually when you suspected some line of code might be problematic. But you can actually create a breakpoint to be hit when an exception is hit. This type of breakpoint is known as exception breakpoint. The question that comes to mind is "what is the reason for this name?" This breakpoint gets activated on encountering an exception.
To create a new exception breakpoint, you just need to remember a few small steps:
Inside the editor, press Ctrl + Shift + F8, where there will be a pop up.
In the left-hand top corner, there is the + sign, press it and you will get an option to create an exception breakpoint.
On proceeding, you will be asked to enter the name of the exception at which you want the execution to halt.
You can also make a customization in the way the breakpoint will behave. You can ask PhpStorm to activate this breakpoint...