How to print out values while debugging
You can do the following steps:
1- Set BreakPoint in the line you want to evaluate Ctrl+F8
.
2- Run your code in debug mode or press Shift+F9
.
3- When reached to the BreakPoint press Alt+F8
or click on the following button.
4- Then type your value in text-field and click on the Evaluate button.
References:
https://www.jetbrains.com/help/idea/debugging-code.html
https://www.jetbrains.com/help/idea/evaluating-expressions.html
Use Watches. It gives you the ability to evaluate expressions.