Is it possible to setup Idea to show variable toString()
value when I hover a mouse over it like in Visual Studio?
2 Answers
Go to Preferences > Build, execution, deployment > Debugger > Data Views and enable show value tooltip on code selection.
-
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. Jul 21, 2020 at 1:27
Place a break point after your variable is assigned a value and intellij will print what value that variable has taken next to it.
-
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?– VladMar 31, 2016 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 Mar 31, 2016 at 20:06
-
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).– VladMar 31, 2016 at 20:10
-
it should do that automatically, have you configured your debugger? Mar 31, 2016 at 20:15
-