Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xdebug - change var_dump nesting level

Tags:

php

xdebug

Hello i enabled the Xdebug extension, but when i dump a long array(like 1000 positions) the xdebug supress the values... is it possible to turn off the supression, not the Xdebug plugin...

here an example to you guys..

object(stdClass)[213]
  public 'OrderGetByStatusResult' => 
    object(stdClass)[214]
      public 'OrderDTO' => 
        array (size=3)
          0 => 
            object(stdClass)[215]
              ...
          1 => 
            object(stdClass)[230]
              ...
          2 => 
            object(stdClass)[266]
              ...
like image 756
Neto Braghetto Avatar asked Jun 21 '13 13:06

Neto Braghetto


2 Answers

You need to change your Xdebug settings, take a look at the http://xdebug.org/docs/all_settings page:

xdebug.var_display_max_children
xdebug.var_display_max_data
xdebug.var_display_max_depth

Add settings to your php.ini or xdebug.ini. For your case is xdebug.var_display_max_depth=-1 to have maximum nesting level.

like image 153
Aurimas Ličkus Avatar answered Oct 27 '22 01:10

Aurimas Ličkus


Here's the quick copy and paste answer for those using Ubuntu 14.04 LTS server

sudo vi /etc/php5/apache2/conf.d/20-xdebug.ini

# paste the following to the file
zend_extension=xdebug.so
xdebug.var_display_max_children=-1
xdebug.var_display_max_data=-1
xdebug.var_display_max_depth=-1

Save and exit.

# for apache2 server
sudo service apache2 restart

# for nginx
sudo service php5-fpm restart
like image 31
Yada Avatar answered Oct 26 '22 23:10

Yada