debugger doesn't show values inside a function [message #506338] |
Thu, 07 January 2010 01:53  |
Ethereal1m Mising name Messages: 37 Registered: January 2010 |
Member |
|
|
Dear all,
I'm new in Eclipse environment and I'm learning using Eclipse PDT with Xdebug. I have a problem that puzzles me. Looks very simple but I cannot figure it out.
Suppose I have this code:
function sum($a,$b) {
$c=1;
return $a+$b+$c;
}
$result=sum(1,2);
And I want the debugger to show $a, $b, and $c. When I step into sum function, instead of showing the variable values, "variables view" says that $a, $b, and $c are uninitialized.
Why is that doing that? How can I make it display the values?
Regards,
Joe
|
|
|
Re: debugger doesn't show values inside a function [message #506376 is a reply to message #506338] |
Thu, 07 January 2010 10:42   |
Eclipse User |
|
|
|
Originally posted by: dkel50.hotremovemail.com
Are you using php 5.3 ? There appears to be a bug on the version of
xdebug for php 5.3 that causes this. The xdebug author is aware of this
but I don't know when the next official build of xdebug is going to be made.
you could check www.xdebug.org for more info about xdebug
Dave Kelsey
On 07/01/10 01:54, soebagio@gmail.com wrote:
> Dear all,
> I'm new in Eclipse environment and I'm learning using Eclipse PDT with
> Xdebug. I have a problem that puzzles me. Looks very simple but I cannot
> figure it out.
> Suppose I have this code:
>
> function sum($a,$b) {
> $c=1;
> return $a+$b+$c;
> }
> $result=sum(1,2);
>
> And I want the debugger to show $a, $b, and $c. When I step into sum
> function, instead of showing the variable values, "variables view" says
> that $a, $b, and $c are uninitialized.
> Why is that doing that? How can I make it display the values?
>
> Regards,
> Joe
>
|
|
|
|
Re: debugger doesn't show values inside a function [message #506500 is a reply to message #506465] |
Thu, 07 January 2010 18:08   |
Eclipse User |
|
|
|
Originally posted by: dkel50.hotremovemail.com
You need to locate a version of xdebug for php 5.3 that has the fix in
it. I don't know if there is one available yet, other people have been
compiling it themselves from svn on linux.
Dave Kelsey
On 07/01/10 16:00, Ethereal1m wrote:
> yes i use 5.3...
> do you think i should use a different version of xdebug?
|
|
|
Re: debugger doesn't show values inside a function [message #506501 is a reply to message #506465] |
Thu, 07 January 2010 18:09   |
Eclipse User |
|
|
|
Originally posted by: dkel50.hotremovemail.com
Or alternatively drop down to php 5.2 and xdebug 2.0.5 this combination
doesn't have this problem.
Dave Kelsey
On 07/01/10 16:00, Ethereal1m wrote:
> yes i use 5.3...
> do you think i should use a different version of xdebug?
|
|
|
|
Powered by
FUDForum. Page generated in 0.02212 seconds