JosephLenton / PHP-Error

Better error reporting for PHP, and prettier too!
1.35k stars 151 forks source link

Compatibility with Xdebug #40

Open scribu opened 11 years ago

scribu commented 11 years ago

Is there any way I can continue to have Xdebug enabled, but use PHP-Error just for error reporting?

JosephLenton commented 11 years ago

Is this a question or an issue? It should be working like that by default; PHP Error takes over the error reporting, however xDebug continues to be available for profiling and debugging.

scribu commented 11 years ago

Then it's an issue, because it doesn't work for me. First I tried changing php.ini and then I tried:

require( 'php_error.php' );
\php_error\reportErrors();

In both cases, error handling is still done by Xdebug.

I'm running PHP 5.4.6 on Ubuntu 12.10.

demonkoryu commented 11 years ago

Is this perchance an xdebug.show_exception_trace problem, as discussed in https://github.com/composer/composer/issues/989#issuecomment-7930968 ?

scribu commented 11 years ago

I don't think so; disabling it doesn't have any effect. I'm triggering a mere Notice error anyway.

druu commented 11 years ago

Worked for me without any problem.

Had to make one change though to keep xDebug's pretty var_dump()

See Pull Request #46