Break on handled exceptions

Answered

Can you break on handled exceptions? I mean when you're working on code with full error handling, you want the code to break at the error point rather than get bubbled up to the error handler.

5 comments

Thanks for that. I'm not sure if that's quite what I'm looking for because with that you have to create a breakpoint which means you know the line in the code you think is causing the exception, I'm talking about stepping over (not into)  mounds of procedures then suddenly an exception occurs in a mystery nested spot and you get kicked up to the error handler without being able to examine the value of all the variables.

0

with that you have to create a breakpoint which means you know the line in the code you think is causing the exception

Actually, no. Exception breakpoints are not bound to any line. Please check the blog post:

https://blog.jetbrains.com/phpstorm/2013/12/just-in-time-debugging-and-php-exception-breakpoints-with-phpstorm-and-xdebug/

2

Thanks. I think that might be it.....

0

Please sign in to leave a comment.