How can I display protected/private properties and properties from the parent-instance in the PHP-Debugger?

Hello together


I used before ZendStudio and looked for a better/faster IDE with better usability.
Over Netbeans and others, I found phpStorm and I'm impressed!
But sometimes there are to many trees in the forest. So maybe I didn't see the most obvious. I searched with Google, and also in Docs &  Demos, and at least with the search-form in this forum. But no hits.
Maybe someone can help me, to find all the properties in the debugger-mode.
I debug with xdebug on OS X Lion and it's very fine.

But I can't find the settings to uncover/display the protected/private properties of a object/instance and the properties from his ancestors.
In the picture you see there is the instance from 'TestController' in '$this' variable. its parent instance 'Controller' has an private  property '_pageTitle' and a public magic method 'getPageTitle()' within  return the value from '_pageTitle'.

In ZendStudio the values from the private/protected from ancestors instances were viewable.

With the "Watches" I couldn't display the private property ^'_pageTitle' direct.
Could someone give me a hint, where I could find the settings for this intention. Or did you know a work around?

Sometimes I would like to see the value from some protected properties  without write the magicMethod in the Watches-window, sometimes there is  also only a set... magicMethod to make it write-only from outside. But  for the development it would be great to see the value.


Thank you for your help



Attachment(s):
pic2.png
3 comments

Hi Martin,

What Xdebug version do you have?

Accordignly to this ticket it is actually Xdebug issue:



You need Xdebug v2.1.3 or newer -- that's the build which has this fix included (accordignly to xdebug author).

Related tickets:

0

Hi Andriy

Thank you for your really speedy solution!
Your hint was the right one :)!!!

I write this for an other OS X user with MAMP, who will look for the same solution in the future, maybe also "only" in the Community and on the FrontSite of phpStorm:

I used the Standard xdebug.so from MAMP 2.0.5. Now I use one from Komodo (http://code.activestate.com/komodo/remotedebugging/) und copied this file to the folder  "/Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/".
Before there was xDebug version 2.1.0 => now Xdebug v2.2.0-dev.
And all the properties are visible!

Shame on me :( I didn't find all your linked sources. Next time I will look also in this destinations.

All the best for Christmas, it's a really good Christmas-present phpStorm generally, and your solution specially!
Thank you again
Martin

0

Please sign in to leave a comment.