12

Is it possible to setup Idea to show variable toString() value when I hover a mouse over it like in Visual Studio?

2 Answers 2

21

Go to Preferences > Build, execution, deployment > Debugger > Data Views and enable show value tooltip on code selection.

enter image description here

Sign up to request clarification or add additional context in comments.

3 Comments

It's not nearly as smooth as VS as you have to actually select (highlight) the whole expression in order to view the value, instead of just hovering over it in VS, but certainly better than nothing.
Still doesn't work 2023
For me the "SHow value tooltip." checkbox was mysteriously disabled. Thanks!
-1

Place a break point after your variable is assigned a value and intellij will print what value that variable has taken next to it.

enter image description here

7 Comments

Seems like I didn't understand you correctly. So all variable values are printed in debug mode on their declaration lines. But in long methods can I view them without scrolling up?
hope the picture makes it more clear, for long methods there is a debugger window which lists all the variables and their corresponding values
How did you make that green label with value to show? I tried the same with if statement but: screencast.com/t/Lreqa88hf I have only the first gray label near the declaration (not on screen).
it should do that automatically, have you configured your debugger?
I didn't change settings, may be it doesn't work with scala
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.