views:

109

answers:

4

Hi,

I'm stepping through code using Eclipse PDT. When I mouseover an array it says e.g. "$_SESSION = Array [0]", but won't show me the data.

This is fine for local varaibles as I can see them in the "Variables" window, but it means that I can't see the contents of $_GET, $_POST, $_SESSION.

How do I fix this?

+1  A: 

Assuming you are using xdebug.

If you look in the Variables window, it will have also list those superglobal arrays you mention (_SESSION, _POST, ...). If you don't see them, try upgrading xdebug. I have found it really buggy, for this very area (variables during debug).

Palantir
I am using Zend Studio CE. Would you recommend switching to xdebug?
waitinforatrain
Never mind, they have magically appeared. Not sure what I did!
waitinforatrain
A: 

There is a little arrow on the left of each array. Click on this expands the list to show the values.

gregambrose
A: 

I don't see the variables in the variables view, instead I see them in the Expressions view.

Paul
A: 

In the editor, when I right-click a variable name during a debug session there are choices "Inspect" and "Watch" in the menu.

I took me a while to find out that to enable those choices I had to select the variable name in the editor before right-clicking. You could also press Ctrl+Shift+I for "Inspect".

"Inspect" opens a content assist window with expandable variable content.

"Watch" will add the variable to the "Expressions" view.

"Variables" view contains all variables in the debug context with expandable content.

It would be nice with a condensed json-like one-line display format for arrays and object variables to see the contents of complex variables at a glance, but I have not found a way to do that yet.

I'm currently using Eclipse 3.6 Helios SR1, Xdebug 2.1.0, PHP 5.3.0, Wamp server

gjohn