Is it possible to setup Idea to show variable toString()
value when I hover a mouse over it like in Visual Studio?
Asked
Active
Viewed 5,686 times
11

Vlad
- 3,001
- 1
- 22
- 52
2 Answers
19
Go to Preferences > Build, execution, deployment > Debugger > Data Views and enable show value tooltip on code selection.

Maria Ines Parnisari
- 16,584
- 9
- 85
- 130

Mykhailo Dmytriakha
- 628
- 1
- 7
- 13
-
1It'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. – JPProgrammer Jul 21 '20 at 01:27
0
Place a break point after your variable is assigned a value and intellij will print what value that variable has taken next to it.

Kaushal Shah
- 87
- 7
-
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? – Vlad Mar 31 '16 at 20:00
-
hope the picture makes it more clear, for long methods there is a debugger window which lists all the variables and their corresponding values – Kaushal Shah Mar 31 '16 at 20:06
-
How did you make that green label with value to show? I tried the same with if statement but: http://screencast.com/t/Lreqa88hf I have only the first gray label near the declaration (not on screen). – Vlad Mar 31 '16 at 20:10
-
it should do that automatically, have you configured your debugger? – Kaushal Shah Mar 31 '16 at 20:15
-
-
try following this http://stackoverflow.com/questions/4150776/debugging-scala-code-with-simple-build-tool-sbt-and-intellij – Kaushal Shah Mar 31 '16 at 20:18
-
ok, thanks, looks like I have to look on declarations or variables window. I'll wait a day before accepting in case someone has a better answer. – Vlad Mar 31 '16 at 20:22