Suppose I have java code like this (only as Example):
public void someMethod(){
int a = 3;
int b = 2; // <-- stay debug here
a = b + 2;
Sy
As stated here by ntotomanov , you can use HotSwap for it. but just adding that i use remote debug to debug my Docker based apps , so if i want this kind of functionality i just comment out the code , and go to Build -> Recompile class or Rebuild Project . then Intellij issues Build & Attempting to HotSwap the code ! in case you did small thing like comment out the code it most of the times always succeeds. happy debugging.