AndreKR / xdebugclient

Automatically exported from code.google.com/p/xdebugclient
0 stars 0 forks source link

Variables tree #18

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In many PHP frameworks and larger scripts, there is a stack trace of all 
variables used in scripts. I think that variables tree next to the code 
with them would be a great feature.

Now, it's necessary to point each variable by cursor and then use inspect. 
Using variables tree would much improve readability and user experience. ;)

Original issue reported on code.google.com by p.pawliczuk@gmail.com on 6 Jun 2009 at 6:37

GoogleCodeExporter commented 9 years ago
What do you mean? Some kind of automatically populated watch window that shows 
all
variables in the current scope?
I'm afraid that's not possible, because I have to request them by name and I 
cannot
request $GLOBALS.

Original comment by andrerdn...@googlemail.com on 7 Jun 2009 at 6:41

GoogleCodeExporter commented 9 years ago
There must be a solution. Look at PHPed screenshot: 
http://www.php-debugger.com/dbg/
gifs/phped32.png - part "globals" or PHP Eclipse - 
http://devzone.zend.com/images/
articles/2930/eclipse_debug.jpg - right side of window.

Original comment by p.pawliczuk@gmail.com on 7 Jun 2009 at 11:51

GoogleCodeExporter commented 9 years ago
Oh, ok. Are you sure that the Variable list is retrieved from xdebug and not 
just
derived from code analysis?

Could you provide me with a log of the xdebug communications when variables are
retrieved from xdebug? You can enable it in php.ini with:
xdebug.remote_log=/tmp/remote_log

Original comment by andrerdn...@googlemail.com on 8 Jun 2009 at 11:52

GoogleCodeExporter commented 9 years ago
I'm almost sure it's possible: http://www.xdebug.org/docs/stack_trace

"xdebug.dump_globals
Type: boolean, Default value: 1 
Controls whether the values of the superglobals as defined by the xdebug.dump.* 
settings whould be shown or not."

I've tried to enable/disable - eg. SERVER have been dumped into inspect in both 
cases.

Dump you asked: http://www.nopaste.pl/d23

Original comment by p.pawliczuk@gmail.com on 8 Jun 2009 at 10:21

GoogleCodeExporter commented 9 years ago
A few lines above it says:
-----
xdebug.dump.*
Type: string, Default value: Empty
* = COOKIE, FILES, GET, POST, REQUEST, SERVER, SESSION. These seven settings 
control
which data from the superglobals is shown when an error situation occurs.
-----
As you can see, GLOBALS is not included.

When I add a watch panel, I actually can add a watch for those seven 
superglobals, if
that is of any use for you. But to save traffic you can also add them one by 
one.

Run a search for "property_get" in the dump and you can also see that GLOBALS 
is not
retrieved.

You can ask Derick on the xdebug mailing list whether there are any reasons 
against
providing GLOBALS... possibly the circular references pose a problem.

Original comment by andrerdn...@googlemail.com on 8 Jun 2009 at 10:34

GoogleCodeExporter commented 9 years ago
Oh, I meant superglobals and already traced variables.

Original comment by p.pawliczuk@gmail.com on 20 Jun 2009 at 5:21