How to see backtrace of an uncaught exception using xdebug and IntelliJ / PHPStorm?

387 views Asked by At

I have set up remote debugging on a guest OS in a Virtual Machine. Breakpoints work, but exceptions display on the rendered screen if one is reached. What I want is for the exception to be "caught" so I can explore the backtrace at the point of the error inside the IntelliJ debugger. Is this possible? What do I need to enable to make this happen?

Note: the profiler is turned off, and almost everything is set to its default in xdebug. The Host and Guest OSs are Windows.

1

There are 1 answers

0
ktamlyn On BEST ANSWER

Create "exception breakpoints" to catch exceptions at runtime https://confluence.jetbrains.com/display/PhpStorm/Using+the+PhpStorm+Debugger#UsingthePhpStormDebugger-BreakingwhenThingsBreakExceptionBreakpoints

I added Exception, Warning, and Notice.

Note: the JIT mode for XDebug, while providing just in time exception handling, does not allow the use of breakpoints, so this did not directly address my need.