How xdebug changes var_dump
Thing you want to do
The var_dump display changed after installing xdebug. I checked specifically how it would change.
#Environment (including items not related to this work)
- MacBookPro (macOS Catalina 10.15.5)
- docker desktop22.214.171.124
$test = ['a' =>'apple','b' =>'bed','c' => ['cat','cookie']]; var_dump($test);
Browser display when xdebug is not set
All are displayed in one line. It’s hard to see.
Browser display when xdebug is set
- var_dump description file, line is displayed
- Automatic line breaks
- value is colored
Since uninstalling xdebug was a hassle, I set the following and checked.
xdebug.overload_var_dump = 0
#Remarks It may be more efficient if you set xdebug.
#Reference There are many other things you can do by looking at the manual settings. https://xdebug.org/docs/all_settings