Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xdebug 3: hide function parameters from call stack

Tags:

php

xdebug

Since upgrading to Xdebug 3, I have a problem with my debug output.

After the error message there is the "call stack". The stack is made of function calls, and for each function call each parameter is dumped in its entirety. If you have objects and the objects get even a bit complex, this renders each frame a huge mess of useless data, and the debug gets enormous.

Is it possible to disable the dump of functions parameters in the call stack?

Here is my config:

xdebug.mode=debug,develop
xdebug.client_port=9000
xdebug.idekey=MYIDE
xdebug.show_local_vars = 0
xdebug.collect_params = 0
#xdebug.var_display_max_data = 128    // no visible effect
#xdebug.var_display_max_depth = 0     // works with side effects on var_dump
xdebug.collect_params = 0

The only thing that worked so far is to set xdebug.var_display_max_depth to 0. But then any explicit var_dump() will be useless, because that setting influences both.

Here I highlighted the part I'd like to hide:
enter image description here

like image 940
Palantir Avatar asked May 10 '26 04:05

Palantir


1 Answers

I needed a quick fix, therefore I just... styled it away.

.xdebug-error tr td:nth-child(4) span {
    max-width: 35rem;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

This is just a workaround. If someone has a better solution, please answer!

like image 143
Palantir Avatar answered May 12 '26 19:05

Palantir