[xdebug-general] Re: 2 Queries about XDebug 2.0.0rc1

From: Derick Rethans <derick[@]xdebug.org>
Date: Wed, 18 Oct 2006 10:16:56 +0200 (CEST)

On Tue, 17 Oct 2006, Dave Kelsey wrote:

> Hi Derick, many thanks for the response. I have raised the defect. In the
> second case, here is an example
> standalone program I quickly tested with.

[snip: code]

> what I did was set a break point at the "reached the end" echo line in
> function level3().
> When I do a get of the global variables I get back the following variables
> level0_a = "level0_a"
> prog_global = "2006-10-17T15:59:400"
> _ENV
> _GET
> The last 7 I expect, but I don't to see level0_a or prog_global, as they
> are not available to that function.

The "Global" context shows everything in the global (level0 scope). This
is also where the super globals belong.

> In fact if a do a context get for the variables in the stack frame that
> represents where I am in level3, I get the variables
> level2_a="level2_a"
> level3_a="level3_a"
> level3_b="level3_b"
> level3_c="level3_c"
> level3_d="level3_d"
> prog_global - uninitialized
> What I am trying to show is all the variables that are available to the
> level3 function, so all the super globals are available
> all the local variables are available, but level0_a should not be present
> and prog_global shows uninitialized which is a bit
> more strange as I get the message "Notice: Undefined variable: prog_global
> in C:\udata-eclipse\phpide025\testXdebug\PhpCode\FunctionVarTest.php on
> line 39" so wouldn't expect to se prog_global as a local variable for that
> context.

Xdebug scans the scope and will add all variables (even not defined
ones) to the list. This is expected. If one of the super globals is used
it should show up as well.

(BTW, Could you please not top-post in replies?)

Received on Wed Oct 18 2006 - 10:17:25 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST