When debugging in eclipse, you can’t view the variable value when hovering over the mouse. Solution

Problem Description: in debug mode, eclipse does not automatically display the corresponding value of a variable when the mouse moves over it.

Solution: in eclipse, click window - > Preferences - > java - > editor - > hovers, check variable values (if combined hover has been selected, cancel it), then click apply, and finally click OK.

Sometimes you don't need to check variable values. You can also check variable values by checking combined hover, so if you check it or not, try a few more times and debug may be good.

Hovers is mainly used to configure the information to be displayed when the mouse moves to a project. Shortcuts to some functions through hovers configuration.

It mainly includes the configuration of the following attributes:

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: adaptive matching display according to the current context and selected elements.

Variable Values - Shows the value of the selected variable when debugging. Variable values: displays the contents of the currently selected variable in the debug mode

Problem Description - Shows the description of the selected problem. Problem Description: displays the description of the current problem (error)

Externalized String - Shows the externalized string of the selected key. Externalized string: displays the visualized string of the selected key.

Javadoc - Shows the Javadoc of the selected element.. Javadoc: displays the document information of the currently selected element

Annotation Description - Shows the description of the selected annotation. Annotation Description: displays the description of the currently selected declaration.

Source - Shows the source of the selected element. Source: displays the source code of the currently selected element.

Here's another trick to make automatic completion more "automatic". It depends on your habits.

In the main menu:

Window -> Preferences -> Java/Editor/Content Assist

Configure "autocomplete trigger for Java" to: (abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz (the default is a ".") And reduce the auto activation delay (for example, to 0 or 100ms). The specific configuration of which letters are used as triggers depends on your needs. For example, it is mentioned in the following comments that "@" can be added to provide automatic completion for annotation.

summary

The above is all about the solution to the problem that you can't view the variable value when hovering over the mouse during debug in eclipse. I hope it will be helpful to you. Interested friends can continue to refer to this site: introduction to eclipse custom startup screen and icon, brief introduction to eclipse code formatting and setting, eclipse association function setting skills, etc. if you have any questions, you can leave a message at any time. Xiaobian will reply to you in time. Thank you for your support!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>