Page 1 of 1

Lots of "error: can not get property" in my watches.

PostPosted: March 20th, 2018, 5:39 pm
by SteveG
I'm not an old hand at debugging php, so it's possible that I'm getting all these "error: can not get property" values in my watches... but then again there are errors in my log the last few days, which coincides with these errors. Any suggestions on how to debug these messages or fix if they are, in fact, bugs?

Re: Lots of "error: can not get property" in my watches.

PostPosted: March 22nd, 2018, 4:40 am
by SteveG
Do any of these entries in my log file help troubleshoot this becomming-more-important-everyday bug:

Code: Select all
  <entry>
    <record>622</record>
    <time>2018/03/21 15:17:26.479</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Performance warning: String load failed. Pkg:{1B027A40-8F43-11D0-8D11-00A0C91BC942} LANG:0409 ID:1301&#x000D;&#x000A;</description>
  </entry>
  <entry>
    <record>623</record>
    <time>2018/03/21 15:17:26.480</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Performance warning: String load failed. Pkg:{1B027A40-8F43-11D0-8D11-00A0C91BC942} LANG:0409 ID:1301&#x000D;&#x000A;</description>
  </entry>
  <entry>
    <record>624</record>
    <time>2018/03/21 15:17:26.483</time>
    <type>Warning</type>
    <source>VisualStudio</source>
    <description>Performance warning: String load failed. Pkg:{1B027A40-8F43-11D0-8D11-00A0C91BC942} LANG:0409 ID:1301&#x000D;&#x000A;</description>
  </entry>


... or:

Code: Select all
  <entry>
    <record>653</record>
    <time>2018/03/21 15:17:28.579</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>Begin package load [Roaming Profiles Package]</description>
    <guid>{C194969A-A5B1-4AF2-A9DF-ECF7CE982A05}</guid>
  </entry>
  <entry>
    <record>654</record>
    <time>2018/03/21 15:17:30.154</time>
    <type>Information</type>
    <source>Extension Manager</source>
    <description>IncompatibilityList - Call Servicehub for downloading compatibility list file.</description>
  </entry>
  <entry>
    <record>655</record>
    <time>2018/03/21 15:17:30.459</time>
    <type>Information</type>
    <source>VisualStudio</source>
    <description>End package load [Roaming Profiles Package]</description>
    <guid>{C194969A-A5B1-4AF2-A9DF-ECF7CE982A05}</guid>
  </entry>


...??

Re: Lots of "error: can not get property" in my watches.

PostPosted: March 22nd, 2018, 8:50 am
by Miloslav Beno
Hi Steve,

Thanks for the post.

May I ask what PHP and Xdebug version you are using? Also please send xdebug.log. You can set up its location in php.ini with xdebug.remote_log option.

The records from VS activility log are not PHP Tools related. 1B027A40-8F43-11D0-8D11-00A0C91BC942 guid is Visual C++ Package.

I'm not sure what C194969A-A5B1-4AF2-A9DF-ECF7CE982A05 is, but it's not PHP Tools.

Thank you,

Re: Lots of "error: can not get property" in my watches.

PostPosted: March 22nd, 2018, 5:56 pm
by SteveG
Hi Miloslav,

Thanks for the quick reply. The VS activity log seems to show errors in VS and not PHP Tools because I get the errors when opening VS without opening any php solutions.

I sent you a private message with info/logs/screenshots/etc to help you analyze my configuration without disclosing it on the board.

Hope to hear from you soon, either on the board or else in a private message.

Thanks again!

- Steve

Re: Lots of "error: can not get property" in my watches.

PostPosted: March 23rd, 2018, 8:56 am
by Miloslav Beno
Hi Steve,

Thanks for all the information provided in the private message. Let me investigate first and get back to you with more information.

Thanks!

Re: Lots of "error: can not get property" in my watches.

PostPosted: March 23rd, 2018, 7:17 pm
by Miloslav Beno
Hi Steve,

Thanks again for the feedback.

I've investigated the issue and currently our debuger doesn't know how to examine deeper direct results of expressions evaluation. Let me show an example:

Code: Select all
 
// Encode the data.
$json = json_encode(
    array(
        1 => array(
            'English' => array(
                'One',
                'January'
            ),
            'French' => array(
                'Une',
                'Janvier'
            )
        )
    )
);

$x = json_decode($json);


If you add $x to the watch you can easily inspect it deeper to all the child objects e.g. $x->1->English->One. But if you put json_decode($json) to watch, you will see just direct child objects.

So for now, if you need to examine objects deeper, you can assign them to some variable.

Anyway I can see how we can improve this so both scenarios would be equivalent. I will inform you in this thread once this is implemented into some preview version.

Thank you!

Re: Lots of "error: can not get property" in my watches.

PostPosted: March 27th, 2018, 3:04 pm
by SteveG
Thanks for the reply, I look forward to any updates which help. In the meantime I'll do as you advise (and have been doing) which is assign values to variables and then watch the variables.