Home > Mobile >  Enable overloaded var_dump while also in xdebug.mode=debug
Enable overloaded var_dump while also in xdebug.mode=debug

Time:04-09

The new Xdebug seems to disable the overloaded var_dump() function while in debug mode. I like to use both var_dump() and breakpoint debugging, but I'm forced to swap back and forth from xdebug.mode=develop for var_dump and xdebug.mode=debug for breakpoints.

Is there any way to enable the overloaded var_dump() while staying in xdebug.mode=debug?

It's not the end of the world, but a bit annoying to have to swap back and forth when I need a clean var_dump() for quick analyzing.

CodePudding user response:

Sure, just list both modes via comma:

xdebug.mode=debug,develop

From https://xdebug.org/docs/all_settings#mode

You can enable multiple modes at the same time by comma separating their identifiers as value to xdebug.mode: xdebug.mode=develop,trace.

CodePudding user response:

you can determine the depth level you want to dump from

;try put it 10 or 13 and see the result
xdebug.var_display_max_depth = 3 

check this

https://xdebug.org/docs/all_settings#var_display_max_depth

I hope it's helpful

  • Related