【问题标题】:Not working - Hover on variable to see value in debug prespective in Eclipse不工作 - 将鼠标悬停在变量上以在 Eclipse 的调试透视图中查看值
【发布时间】:2011-02-17 19:39:57
【问题描述】:

我使用的是经典的 Eclipse 3.6.1。 我有一个 Java 项目,由于堆栈溢出而引发异常。 与其他编辑器不同,当我将鼠标指针悬停在变量上时,它不会显示该变量的值。 这是

中的设置
Window->Preferences->Java->Editor->Hovers
Combined Hover - Shift
Variable Values - Ctrl
Source - Shift+Ctrl

但这似乎不起作用。我已经看到其他人关于同样问题的线程,但找不到解决方案。这是一个尚未修复的错误吗?

谢谢!

【问题讨论】:

    标签: eclipse debugging variables hover


    【解决方案1】:

    转到窗口 - 首选项 - Java - 编辑器 - 悬停。

    Is "Combined Hover" selected? Uncheck it; apply; close the window; restart debugging session; go back; check it again; apply.
    If the above doesn't help, you can check "Variable Values" option and specify a modifier key for it. Not as convenient as "combined", but should work.
    

    通过重命名包,问题得到“修复”。

    无论出于何种原因,这种重构在 Eclipse 中触发了一些东西,并且我立即能够在调试期间查看变量值。此外,当我回到悬停下的首选项时,我现在可以看到“变量值”选项。

    【讨论】:

    • 我添加了一个修饰符,我可以使用修饰符查看变量值。但是,它是一种痛苦。正常悬停会一直转到 javadoc 或方法签名。
    【解决方案2】:

    在我的情况下,悬停下的首选项已被选中并启用。即使在那之后,当我在变量上移动鼠标时它也没有显示值。通过简单地关闭并重新打开 Eclipse(我使用 Eclipse 和 Python)来解决问题。

    【讨论】:

      猜你喜欢
      • 2016-07-20
      • 2020-10-16
      • 2013-08-28
      • 2015-09-09
      • 2010-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多