Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between "Step Into" and "Force Step Into" in the Intellij debugger?

What is the difference between step into and force step into in debugging?

like image 206
Tejpal Rebari Avatar asked Jan 02 '20 09:01

Tejpal Rebari


1 Answers

From my own observation using the IntelliJ debugger over the years, if you try to step into a method call on a given line of code, the following will happen:

  • if the code being called be your own code, then the debugger will step into that method
  • if the code being called be some third party library, then the debugger will ignore your request, and instead step over that line

By telling IntelliJ to force step into a line, in the case of a third party method, it will then try to find source code for that method. If it can't find source code, then it might show you an auto generated stub based on the byte code/library. But, there may not be any code shown, or if there is, it would be IntelliJ's best guess based on byte code.

like image 170
Tim Biegeleisen Avatar answered Sep 30 '22 20:09

Tim Biegeleisen