2

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.

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Excellent, thanks. I'm using Netbeans now and have also tried MacGDBp and thought I saw the same issue on each. After yesterday I'm not so confident though that there wasn't some other issue. In any case, great answer thanks again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.