Reputation: 1
The IntelliJ IDEA program has a debugging option, but I don't know if I can check the intermediate values of the variables through it. For example, in the code, when I put a breakpoint, I don't know how I could add the input values to see the intermediate values.
Upvotes: 0
Views: 96
Reputation: 16381
If you mean to set the variable values through the debugger, - yes, you can use Set from the context menu of the variable:
Set variable values If there is a need to test how the program would behave in certain conditions or fix its current behavior at runtime, you can do that by setting/changing the variable values.
Right-click a variable on the Variables tab and select Set value, or select the variable and press F2.
Enter the value for the variable and press ⏎.
Upvotes: 1
Reputation: 9384
Of course you can debug your code and step through it to better understand what is happening. In essence, you would set a breakpoint at a location of your interest, then tell IntelliJ to run your program in debug mode (breakpoints enabled). How to do this exactly can be seen from various fine resources:
Upvotes: 2