Intelij Java (maybe other than Java, but unconfirmed)
If you write the code below, it will naturally be displayed as "Hello World", Suppose you want to put another value in str called "Hello World!" While debugging.
In such a case, set a breakpoint → Right click →More(command + shift + F8)
The BreakPoints window will appear Check Evaluate and log → Substitute a value for str → (If you don't want to stop at a breakpoint) Uncheck Suspend
If you execute Debug in this state
"Hello World!" It appears twice because of the log output by Evaluate and "log".
In addition to assigning values, you can also execute methods. I think it can be used for debugging code that is executed only under special conditions.