php - Eclipse 调试器 (PHP) - 如何查看 super 全局变量和类属性?

标签 php eclipse debugging

是否可以在调试器变量透视图中看到 $_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/

相关文章:

php - 如何按订单更换

php - 将 mySQL 结果拆分为两个 <div> 并限制为 4

java - 为什么当我更改最大堆大小时 Eclipse 打不开?

python - 扭曲回溯中的 "<exception caught here>"行是什么意思?

c - 分配错误 : incorrect checksum for freed object

python - GDB pretty-print : returning string from a children()'s iterator, 但显示为 char[]

php - 按行编辑表格

使用循环的 JavaScript 变量

java - 为什么按钮在 textview 全文之后隐藏?

java - Eclipse找不到Maven依赖包