Disabling Xdebug's dumping of caught exceptions

Posted by nuqqsa on Stack Overflow See other posts from Stack Overflow or by nuqqsa
Published on 2010-05-25T11:29:38Z Indexed on 2010/05/25 12:11 UTC
Read the original article Hit count: 322

Filed under:
|
|
|

By default Xdebug will dump any exception regardless of whether it is caught or not:

try {
    throw new Exception();
}
catch (Exception $e) {
}
echo 'life goes on';

With XDebug enabled and the default settings this piece of code will actually output something like the following (nicely formatted):

( ! ) Exception: in /test.php on line 3 Call Stack
#   Time    Memory  Function    Location 1  0.0003  52596   {main}( )   ../test.php:0
life goes on

Is it possible to disable this behaviour and have it dumping only the uncaught exceptions?

Thanks in advance.

UPDATE: I'm about to conclude that this is a bug, since xdebug.show_exception_trace is disabled by default yet it doesn't behave as expected (using Xdebug v2.0.5 with PHP 5.2.10 on Ubuntu 9.10).

© Stack Overflow or respective owner

Related posts about php

Related posts about exception