Asked  7 Months ago    Answers:  5   Viewed   47 times

I am using xdebug (php_xdebug-2.1.2-5.3-vc9.dll) on WAMP. When I use var_dump on a large object or variable it does not show the full variable.

array
'node' => 
  array
    'my_form' => 
      array
        'form' => 
          array
            ...

Without xdebug it shows as should be expected. I looked at the documentation but did not see a solution. Does anyone know how I can fix this so xdebug var_dump shows the full object?

 Answers

94

These are configurable variables in php.ini:

; with sane limits
xdebug.var_display_max_depth = 10
xdebug.var_display_max_children = 256
xdebug.var_display_max_data = 1024 


; with no limits
; (maximum nesting is 1023)
xdebug.var_display_max_depth = -1 
xdebug.var_display_max_children = -1
xdebug.var_display_max_data = -1 

Of course, these may also be set at runtime via ini_set(), useful if you don't want to modify php.ini and restart your web server but need to quickly inspect something more deeply.

ini_set('xdebug.var_display_max_depth', '10');
ini_set('xdebug.var_display_max_children', '256');
ini_set('xdebug.var_display_max_data', '1024');

Xdebug settings are explained in the official documentation.

Wednesday, March 31, 2021
 
CodeCaster
answered 7 Months ago
98

Xdebug 3 will be supported from PhpStorm 2020.3 version only, which is currently in EAP stage (Early Access Program) and will be released in about 1 month time.

For the moment you will have to either stick to Xdebug 2.9 for your 2020.1 IDE version or try latest 2020.3 EAP build: https://www.jetbrains.com/phpstorm/nextversion/

Xdebug 3 is supported in the most recent EAP #6 build: https://blog.jetbrains.com/phpstorm/2020/11/phpstorm-2020-3-eap-6/


As for the Xdebug 3 upgrade in terms of making changes for Xdebug settings (php.ini) -- check this link: https://3.xdebug.org/docs/upgrade_guide

Xdebug 3 related docs are currently hosted on a temporary https://3.xdebug.org/ domain.


You CAN use your 2020.1 PhpStorm with Xdebug 3 if you wish -- just configure Xdebug 3 properly.

It works fine for me with Xdebug 3.0.0beta1, PHP 7.4 x64 on Windows 10 -- see this question: https://stackoverflow.com/a/64820427/783119

Those errors that you see indicate that you still have Xdebug 2 config values in your php.ini.

Wednesday, March 31, 2021
 
nighter
answered 7 Months ago
55

In Symfony4, 'dump' appears to be in Flex's 'debug-pack'

composer req debug-pack
Wednesday, March 31, 2021
 
altexpape
answered 7 Months ago
45

Here's the documentation of the URL format for VS Code.

Thus, the xdebug config is:

xdebug.file_link_format="vscode://file/%f:%l"
Saturday, May 29, 2021
 
Xatoo
answered 5 Months ago
93

You are using PhpStorm 2018.1.x with Xdebug 2.7.

Either upgrade PhpStorm to the latest stable 2018.3.x or downgrade Xdebug to 2.6.x

The problem is in recently changed XML namespace in Xdebug protocol, as of Xdebug 2.7 (https instead of http). It's fixed/supported since PhpStorm 2018.3 (see WI-43622).

Tuesday, June 15, 2021
 
AlterPHP
answered 5 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :
 
Share