MantisBT - Xdebug
View Issue Details
0000614Xdebug(No Category)public2010-09-08 07:512011-08-14 19:02
rishadomar 
derick 
normalmajoralways
closedfixed 
2.1.0 
 
Linux Ubuntu 10.04
5.3.2
0000614: local variables loses class members (used Komodo IDE as client)
When debugging in Komodo IDE 5, using xdebug (xdebug-2.1.0RC1), the Locals tab shows my the local variables fine. But expanding a class (an I think especially an extended class) then it shows CLASSNAME as a member variable overwriting another member. Also, CLASSNAME appears more than once. Actually, I appreciate the CLASSNAME - very useful, but I also want the other members.

$ php -v
PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:03:45)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

A small php file that reproduces bug

<?php

class Base
{
    private $a;
    private $b;
    private $c;
    private $d;
    private $e;
    private $f;
    private $g;
    private $h;
    private $i;
    private $j;
    private $k;
    private $l;
    private $m;
    private $n;
    private $o;
    private $p;
    private $q;
    private $r;
    private $s;
    private $t;
    private $u;
    private $v;
    private $w;
    private $x;
    private $y;
    private $z;
    private $z1; // comment these last few variable out and $z then disappears from member list!
    private $z2;
    private $z3;
    private $z4;
    
    public function __construct()
    {
        $this->i = 99;
        $this->j = 88;
    }
}


class Extension extends Base
{
    private $k;
    private $m;
    private $j;
    
    public function __construct()
    {
        $this->k = 77;
        $this->m = 66;
        $this->j = 55;
    }
}


    $b = new Base();
    $e = new Extension();
    
    echo "Hello World\n";


?>



You can use this php file to replicate. Debug and list the variables $b
and $e. On my more complex code, some members are missing. In fact, in the base
when I don't declare $z1, $z2, $z3 and $z4 then $z is hidden.











$ php -v
PHP 5.3.2-1ubuntu4.2 with Suhosin-Patch (cli) (built: May 13 2010 20:03:45)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
No tags attached.
Issue History
2010-09-08 07:51rishadomarNew Issue
2010-09-08 07:51rishadomarOperating System => Linux Ubuntu 10.04
2010-09-08 07:51rishadomarPHP Version => 5.3.2
2010-09-08 07:51rishadomarXdebug Version => 2.1.0
2010-09-08 07:54rishadomarNote Added: 0001568
2010-09-08 07:55rishadomarTag Attached: png
2010-09-08 07:58rishadomarTag Detached: png
2010-09-08 17:47ericpNote Added: 0001569
2011-06-23 06:14user1370Note Added: 0001755
2011-06-23 06:14user1370Note Edited: 0001755bug_revision_view_page.php?rev_id=25
2011-06-23 06:14user1370Note Edited: 0001755bug_revision_view_page.php?rev_id=26
2011-06-23 08:10derickNote Deleted: 0001755
2011-08-14 19:02derickNote Added: 0001783
2011-08-14 19:02derickStatusnew => closed
2011-08-14 19:02derickAssigned To => derick
2011-08-14 19:02derickResolutionopen => fixed
2016-07-31 13:35derickCategoryDebug client (console) => debugclient (debugging tool)
2016-07-31 13:35derickCategorydebugclient (debugging tool) => (No Category)

Notes
(0001568)
rishadomar   
2010-09-08 07:54   
This is what the development team at Komodo had to say:

"Chances are low that Komodo is doing anything incorrect here -- Komodo
simply asks PHP/xdebug for information on the current process, and
displays the results in the UI. I noticed that there was one bug
asking for the CLASSNAME of an object (http://bugs.xdebug.org/view.php?id=518 [^]),
but we do that anyway. There's also another bug complaining about
repeated "CLASSNAME" lines:

http://bugs.xdebug.org/view.php?id=551 [^]
"
(0001569)
ericp   
2010-09-08 17:47   
Komodo bug ref: http://bugs.activestate.com/show_bug.cgi?id=87785 [^]
(0001783)
derick   
2011-08-14 19:02   
Fixed for 2.1.2 and 2.2.