I am curious how to execute previous line of code while debugging?
Currently, I see the following buttons: - Step over; - Step into; - Force step into; - Step out;
but no button "Step previous".
I am curious how to execute previous line of code while debugging?
Currently, I see the following buttons: - Step over; - Step into; - Force step into; - Step out;
but no button "Step previous".
By default, you cannot advance backwards while debugging code. Since code runs are temporal, one should be able to re-run the code that they're debugging to narrow in on what specifically they want to observe in the debugger.
However, if you really want to be able to debug and step backwards, then the Chronon plugin is a viable option. Note that you won't be dropped into a debug context immediately, and you won't be able to access any live evaluation, but this will allow you to debug your code by stepping forwards and backwards.
You could Drop Frame - it will return you to a previous method, so you can step on that line again. See When using the Java debugger in Intellij what does "Drop Frame" mean?