MantisBT - Xdebug
View Issue Details
0000687XdebugUsage problems (Wrong Results)public2011-04-29 17:022012-05-06 15:53
0000687: Xdebug does not show dynamically defined variable
"Dynamically" defined variables aren't visible with dbgp's context_get, but are visible with PHP's get_defined_vars() and actually exists
$nameHolder = 'name';
$$nameHolder = 'value';
var_dump($$nameHolder);//breakpoint here [^]
No tags attached.
log xdebug.log (34,176) 2011-04-29 17:02
Issue History
2011-04-29 17:02nnmatveevNew Issue
2011-04-29 17:02nnmatveevFile Added: xdebug.log
2011-05-13 20:39BlizzNote Added: 0001745
2012-03-12 16:25derickTarget Version => 2.2.0
2012-05-06 15:53derickStatusnew => closed
2012-05-06 15:53derickAssigned To => derick
2012-05-06 15:53derickResolutionopen => fixed
2016-07-31 13:36derickCategoryUsage problems => Usage problems (Crashes)
2016-07-31 13:38derickCategoryUsage problems (Crashes) => Usage problems (Wrong Results)

2011-05-13 20:39   
I don't know if this is related but it looks like it.
XDebug only reports a small fraction of an objects attributes compared to DBG.

If you have a class with subclasses DBG shows all member variables as well as the defined properties for both the class and anything it is derived off (including protected and private variables).

I honestly don't know if this is even possible to accomplish in XDebug but it is a lot more work to have to look up and add watches for most of the variables that were readily available in my previous debugger.

For example if an object has a getAttributes() function a ->attributes child variable would be displayed by DBG. I dont know if this is based on PHPDoc property statements or whether it detects getter like functions.

I really like a lot of stuff in XDebug but this is the only point atm that makes me switch back to my previous editor with DBG once in a while. Can you please make an even bigger fanboy out of me by making it so no switching is needed anymore ? :)