当前位置: 移动技术网 > IT编程>开发语言>Java > Eclipse中Debug时鼠标悬停不能查看变量值解决办法

Eclipse中Debug时鼠标悬停不能查看变量值解决办法

2019年07月19日  | 移动技术网IT编程  | 我要评论

青囊尸衣有声小说,慢慢 张学友,相片十字绣

问题描述:eclipse在debug模式下,当鼠标移动到某个变量上面时不自动显示该变量对应的值。

解决方法:在eclipse中点击 window->preferences->java->editor->hovers, 勾选variable values,(如果combined hover已经选择了,就取消它), 然后点击apply,最后点ok。

有时不需要勾选variable values,只勾选combined hover也能查看变量值,所以勾不勾选多试几下,debug可能就好了。

hovers主要是来用配置当鼠标移动到工程中的某一项目上时所需要展示的信息。通过hovers配置实现一些功能的快捷方式。

主要包括以下几个属性的配置:

combined hover - tries the hovers in the sequence listed in above table, excluding this hover, and uses the one which fits best for the selected element and the current context.
combined hover:根据当前上下文以及选择的元素 进行自适应匹配展示。

variable values - shows the value of the selected variable when debugging.
variable values :debug模式下展示当前选择变量的内容

problem description - shows the description of the selected problem.
problem description:显示当前问题(错误)的描述信息

externalized string - shows the externalized string of the selected key.
externalized string: 显示所选键的形象化字符串。

javadoc - shows the javadoc of the selected element..
javadoc:显示当前选择元素的文档信息

annotation description - shows the description of the selected annotation.
annotation description :显示当前选择声明的描述信息。

source - shows the source of the selected element.
source:显示当前选择元素的源码。

下面再介绍一招可以让自动补全用起来更“自动”。好不好用取决于自己的习惯。

在主菜单的:

window -> preferences -> java/editor/content assist

把"autocomplete trigger for java"配置为:.(abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz
(默认值是一个“.”)并且把auto activation delay降低(例如说降低到0或者100ms)。具体配置哪些字母作为trigger看自己需求怎样。例如下面评论里有提到可以添加“@”来给annotation也提供自动补全。

总结

以上就是本文关于eclipse中debug时鼠标悬停不能查看变量值解决办法的全部内容,希望对大家有所帮助。感兴趣的朋友可以继续参阅本站:eclipse自定义启动画面和图标的方法介绍eclipse代码格式化设置简单介绍、等,有什么问题可以随时留言,小编会及时回复大家的。感谢朋友们对本站的支持!

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网