开发者

Xdebug remote debugging variable string length

开发者 https://www.devze.com 2023-02-28 03:00 出处:网络
What is the maximum string length for variables\' values that Xdebug sends a remote debugging client and can this be altered?

What is the maximum string length for variables' values that Xdebug sends a remote debugging client and can this be altered?

I've only found this in the documentation:

xdebug.var_display_max_data Type: integer, Default value: 512 Controls the maximum string length that is shown when variables are displayed with either xdebug_var_dump(), xdebug.show_local_vars or through Function Traces. This setting does not 开发者_运维百科have any influence on the amount of data that is send to the client through the Remote Debugging feature.

I'm working with code that is building whole HTML documents programmatically (elgg, elglib.php->elgg_view_layout()) and the variable values I need to watch seem to be getting truncated.

I'm running OSX 10.6.7, PHP 5.3.4, Xdebug 2.1.1 installed from PECL.


To my understanding, it depends on the debug client you use.

If your debug client uses the DGBP protocol of Xdebug 2, it could send

feature_set -i <transaction_id> -n max_data -v 2048

for example, to negotiate a maximum data length of 2048 bytes for property_get commands to initially retrieve (instead of the default length the debug engine would use otherwise).

If the data is larger than 2048 bytes, the debug client could send a property_value command to retrieve the entire data.

So technically it should be no problem to alter the maximum length, nor to retrieve the entire data.

The question is, does your debug client send such feature_set commands, does it support property_value commands and most important, does it allow you to modify the value sent for max_data anywhere in its settings/configuration.

0

精彩评论

暂无评论...
验证码 换一张
取 消