Arrays in variable inspector

3 views
Skip to first unread message

goo...@pramach.de

unread,
Jun 8, 2020, 4:59:09 AM6/8/20
to Blue Static Support
Hi
Using MacGDB 2.0.2

I have an array like
level1 => array( level2 => array( level3 => array( key1231 = val1231, key1232 => val1232)))

In the variables list, I see $level1 and I have it not opened to see the details.
When I now mark the $level1 variable and go to the inspector, I do not see all the details untill I open them first in the variables list.

Real life example:
(
    LEVEL1    =>    (
        LANGUAGES    =>    (
            CZ    =>    (
                PATH    =>    CZ.php
                STATUS    =>    OK
                ISLEPTON    =>    (null)
                ERROR    =>   
            )
            DA    =>    (
                PATH    =>    (null)
                STATUS    =>    (null)
                ISLEPTON    =>    (null)
                ERROR    =>   
            )
            DE    =>    (
            )
 
        )
    )

I see real values of CZ and DA, because I had manually open them in the variable list.
DE I do not see because I had not open it.

Hope is clear.
Not sure if bug or feature.

In case of feature, is /will there be a possibility to change this behaviour ?

Robert Sesek

unread,
Jun 11, 2020, 6:51:11 PM6/11/20
to blues...@googlegroups.com
Hi,

This is working as expected. Xdebug by default only returns structured data up to a specific depth. MacGDBp then lazily fetches the deeper data as the variables are expanded in the outline view. The inspector is just showing a string representation of the data that have been fetched already. If you want to view the whole object, I'd recommend using print_r($variable, TRUE) in the Eval tab, which will format the whole object via the running script.

It does look like there's an Xdebug feature for controlling the default max_depth (https://xdebug.org/docs/dbgp#feature-names). I haven't tested to see if this works as expected or not. It is a reasonable feature request to add a preference for this, though.

- Robert

--
You received this message because you are subscribed to the Google Groups "Blue Static Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bluestatic+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bluestatic/9aa8fd0b-bc93-477d-8b62-5ce48e9408a6o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages