how to inspect static variables? |
Site Admin
|
In your example $names is not a variable. That's why it's not shown in neither locals nor globals.
This is a class property. In order to see static properties and class constants, just type class name followed by double-colon in Watch or Immediate window, like below: Test:: you can also use self:: to see statics of current class. |
||||||||||||
_________________ The PHP IDE team |
|
Hi Dmitri, thank you for your reply. Yes, I am aware of dumping static properties via window Immediate (Watch). However honestly, this is a very uncomfortable way of inspecting existing variables (from programming perspective, they ARE still variables, does not matter whether instantiated in class, global or static - programmer needs to see it). Is there any plan to provide debugger with feature of inspecting static members? What about extra window called "Static" ..? Can I put it into feature request please - is it actually doable? Thanx a lot, Lubos |
||||||||||||||
|
Site Admin
|
yes it's doable. But don't you need to see statics for only 1-2 classes? If so, sending statics for all the classes would bring a big overhead.
I planned some changes in debugger protocol that I'll do during this year. Perhaps, I'll think about this feature at the time. |
||||||||||||
_________________ The PHP IDE team |
|
It is unpredictable which class/method will use static variables, which not. Some developers favour using static variables - their applications are then very hard to debug, dumping manually static members after each breakpoint.... ( I am not sure about the overhead (if current overhead 5-15% would increase to 10-20% it would be OK), but from developer's point of view, inspecting the code in debug window is much more important than the speed of debugger during development (well, if overhead would cause e.g. +30% slowdown, then it would be a problem). What about having *fast* filter that will only send to "static window" classes and/or local functions that truly use static variables rather than all classes? Static windows should also display local static variables within a class's method - depending on the scope. BTW - inspector for static variables is also on todo list/feature request of XDebug... Thanx a lot. Lubos |
||||||||||||||
|
how to inspect static variables? |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by