views:

72

answers:

1

I'm not too great with xdebug so forgive me if this is a stupid question. But I installed it on a separate machine and it performed some magic for me like formating my var_dump() output and catching any uncaught exceptions. It also fails to format the stack traces, outputting plain text which is extremely hard to read.

As I am learning the Lithium PHP Framework I am required to use php5.3, on my other machine I compiled from the source but on this machine I'm using the precompiled packages from dotdeb.org. As far as I can tell the only difference is that this is a slightly newer version of php and it comes with the Suhosin patch.

The other odd thing is that the xdebug functions such as xdebug_var_dump() work, aside from poor formatting.

This is an Ubuntu machine, so I don't know if it could be anything to do with the dotdep packages, but I have installed xdebug through pecl, the downloadable tarball and from the SVN repository. But to no avail.

You can see my php.ini and output of php -i in the following gist. I copied php.ini from /etc/php5/apache2/php.ini over to /etc/php5/cli/php.ini so php -i should reflect my apache setup.

http://gist.github.com/391675

Any help is appreciated.

  • Rich
+1  A: 

I believe you need to change line #604 of your php.ini to:

html_errors = On

From the Xdebug documentation:

http://xdebug.org/docs/all_settings

xdebug.overload_var_dump

Type: boolean, Default value: 1, Introduced in Xdebug 2.1

By default Xdebug overloads var_dump() with its own improved version for displaying variables when the html_errors php.ini setting is set to 1. In case you do not want that, you can set this setting to 0, but check first if it's not smarter to turn off html_errors.

awgy
Thanks, I will give it a go when I get back to the office.
rich97
Thanks, worked perfectly.
rich97