[xdebug-general] Re: extract()?

From: Derick Rethans <derick[@]xdebug.org>
Date: Fri, 25 Mar 2011 09:11:22 +0000 (GMT)

Hi!

On Wed, 23 Mar 2011, Thomas Widlar wrote:

> I am debugging with XDebug, Eclipse PDT, XAMPP, Windows7.
> I was looking like PHP extract() wasn't working. Some but not all of the
> expected variables in the Variables list as <Uninitialized> and when I hover
> over them in the source as empty. But the variables list showed the array was
> all right. The list() was flaky as well, but less flaky.
>
> Then I found this at http://php.net/manual/en/function.extract.php
> (23-Feb-2010 06:07> <http://www.php.net/manual/en/function.extract.php#96370>).
>
> "I use XDebug with NetbeansIDE to for analyzing and developing PHP Code. When
> debugging an extract statement no new variables appeared in the variable's
> list. Although all variables created by extract could be examined by explicit
> watch items and single variables appeared as soon as an PHP script makes use
> of them I am not sure weather it is a wrong configuration, a feature or a bug
> in XDebug."
>
> Am I doing something wrong? Or is the a problem between ||XDebug, Eclipse PDT,
> XAMPP and Windows7.

I think this is a bug in Xdebug. It is because Xdebug scans the function
for variables names to show them in the list to the IDE. However, when
the function is defined/declared, Xdebug doesn't know that extract is
going to create new variables. Obviously, it should be able to figure
this out, so this is a bug. Would you mind filing a bug report at
http://bugs.xdebug.org so that I don't forget?

cheers,
Derick

-- 
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org
twitter: @derickr and @xdebug
Received on Fri Mar 25 2011 - 09:11:22 GMT

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