問題描述: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時鼠標懸停不能查看變量值解決辦法的全部內容,希望對大家有所幫助。有什么問題可以隨時留言,小編會及時回復大家的。感謝朋友們對本站的支持!
原文鏈接:http://www.cnblogs.com/wbyp/p/6693936.html