Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » xdebug doesn't show static value(xdebug-2.0.5 and php 5.2)
icon5.gif  xdebug doesn't show static value [message #507675] Thu, 14 January 2010 10:46 Go to next message
Ethereal1m Mising name is currently offline Ethereal1m Mising nameFriend
Messages: 37
Registered: January 2010
Member
Dear experts,
I'm using xdebug on eclipse but I cannot view a static variable of a class.
Suppose I have this code:
class Value {
	static $counter = 1;
	var $a=10;	
	function get() {
		echo Value::$counter;
		echo "<br/>";
	}
	function getA() {
		echo $this->a;
		echo "<br/>";
	}
	function add() {
		$this->a++;
		self::$counter++;
	}
}
$value = new Value();
$value->get();
$value->add();
$value->get();
$value->getA();


The debuger only shows property variable "a" but not "counter". Is this a bug or I miss something? I use xdebug-2.0.5 and php 5.2 and eclipse IDE for PHP developer ver 1.2.1

Best regards,
Ethereal1m
Re: xdebug doesn't show static value [message #507683 is a reply to message #507675] Thu, 14 January 2010 11:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dkel50.hotremovemail.com

xdebug doesn't provide the information about static class variables.
Someone raised this on the xdebug mailing list and I think the xdebug
author agreed to look into it at some point.

Dave Kelsey

On 14/01/10 10:46, Ethereal1m wrote:
> Dear experts,
> I'm using xdebug on eclipse but I cannot view a static variable of a
> class. Suppose I have this code:
>
> class Value {
> static $counter = 1;
> var $a=10;
> function get() {
> echo Value::$counter;
> echo "<br/>";
> }
> function getA() {
> echo $this->a;
> echo "<br/>";
> }
> function add() {
> $this->a++;
> self::$counter++;
> }
> }
> $value = new Value();
> $value->get();
> $value->add();
> $value->get();
> $value->getA();
>
>
> The debuger only shows property variable "a" but not "counter". Is this
> a bug or I miss something? I use xdebug-2.0.5 and php 5.2 and eclipse
> IDE for PHP developer ver 1.2.1
>
> Best regards,
> Ethereal1m
Re: xdebug doesn't show static value [message #507687 is a reply to message #507675] Thu, 14 January 2010 11:51 Go to previous message
Ethereal1m Mising name is currently offline Ethereal1m Mising nameFriend
Messages: 37
Registered: January 2010
Member
Sad

thanks for the reply
Previous Topic:Syntax highlighting error
Next Topic:2.2.0 Nightly Builds
Goto Forum:
  


Current Time: Sat Apr 20 01:05:25 GMT 2024

Powered by FUDForum. Page generated in 0.03441 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top