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
  • Run -> View Breakpoints
  • Click on the + icon
  • Choose PHP Exception Breakpoints
  • Type Error as the Exception name.
  • Click on the + icon
  • Choose PHP Exception Breakpoints
  • Type RuntimeException 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

Leave a comment

Your email address will not be published. Required fields are marked *