是否可以在调试器变量透视图中看到 $_SESSION 和 $_POST 等 PHP super 全局变量?
此外,在下面的示例中...
class myclass {
public myvar = 'value';
...
}
...如果我正在调试类,我希望能够在调试器中看到 $this->myvar
最佳答案
似乎 super 全局变量的可用性在 ZS8 中发生了显着变化。来自 this post in Zend Forums :
During development of Zend Studio 7 the decision was made to restrict the variables list displayed in the Variables view to the current scope (e.g. current function scope). We are convinced that this approach provides better usability and performance of debugging. BTW, this is a standard approach for many IDE products.
我不能说这对我来说有多大意义(实际上这是一个令人头疼的问题),如果它确实成为许多 IDE 中的标准,那么这似乎不太像是 ZS8 更改的理由,而更像是一个普遍的坏主意。但我会停止提示。
该帖子似乎暗示您可以通过切换您在调试器中查看的堆栈来查看超全局变量(他们给出了 this rather unhelpful link )。我没有成功。
目前,查看超全局变量的唯一明显方法是打开表达式 View (Window > Show View > Expressions)并输入您希望查看的变量。
关于php - Eclipse 调试器 (PHP) - 如何查看 super 全局变量和类属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7295461/