Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 330792 - [Debugger] missing $this variable in 'Variables' window
Summary: [Debugger] missing $this variable in 'Variables' window
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP Debug CLA
QA Contact: Ilina Stefanova CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 07:20 EST by Roy Ganor CLA
Modified: 2020-05-14 11:25 EDT (History)
2 users (show)

See Also:


Attachments
patch (2.08 KB, patch)
2010-11-23 00:33 EST, xu jiaxi CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Roy Ganor CLA 2010-11-22 07:20:23 EST
During debugging I cannot see, in the 'Variables' window, the value of variables that are attributes of a class.

E.G.
two programs, a.php, which requires b.class.php

a.php
-----------------
<?php

require_once "b.class.php";
$instance = new b;
$instance->doSomething();
exit;
?>

b.class.php
------------------
<?php

class b
{
public $varOne;
private $varTwo;

public function doSomething()
{
$this->varOne = simplexml_load_file("http://someUrl.com/somefile.xml");
$this->varTwo = "some val";
$local = "some other var";
..... more stuff here ...
}
}

?>
In the above example, when I have the prog running in debug (by using the "debug" toolbar option on my firefox browser) and I am stepping through the entire thing line by line, the debugger nicely steps from a.php into b.class.php. As I step through the method doSomething() I cannot see how to 'see' the assigned value of $this->varOne. I can see the locally scoped variable "$local", but I cannot find a way to see what the value of $this->varOne is ..
When I am in 'a.php' I can see the local object $instance, and from there I can see the attributes, but that is no use when I am actually in the class file itself.


Obviously this is a bit of a problem as that, for me, is half the point of having a debugger .... :(
Comment 1 xu jiaxi CLA 2010-11-23 00:33:05 EST
Created attachment 183629 [details]
patch
Comment 2 Zhongwei Zhao CLA 2011-04-21 02:10:46 EDT
applied the patch
Comment 3 Ilina Stefanova CLA 2011-08-03 04:16:27 EDT
Verified.