sajad torkamani

Note: I think this will only break on errors like bad types or missing semi-colons. It won’t break on exceptions thrown by frameworks / libraries.

PHPStorm: Break on all PHP errors
  • View > Tool Windows > Debug
  • Click on the View Breakpoints button (red circle just below the stop button).
  • Click on the + icon
  • Choose PHP Exception Breakpoints
  • Type Error as the Exception name.

Now, do something to throw an error (e.g., call an undefined method foobar()) and PHPStorm should break when it encounters that error.

You can view the error by opening the Debugger tab and examining the exception / error thrown.

Sources