IntelliJ Debugger Step Over button Steps in

Answered

I am a newbie to CS and this is my first time writing a post, so please have patience.

In troubleshooting my code, I have noticed that the debugger's "Step Over" button inconsistently but almost always acts like it is a "Step Into" button. If I have a function call on a line and I have a breakpoint somewhere in that function, I would understand why it would want to step in instead of stepping over. Most of the time, however, even when I don't have any breakpoints that would cause "Step Over" to act in such a way, it still steps in. What is annoying is that if in the place it stepped in it has a line that calls something else, it'll step into there as well. Pretty soon the uncalled-for step-ins send me all over the Java library class and it'll be going over line by line in Java library files and I NEVER place breakpoints in there.

Speaking of which, if I have a breakpoint on line 25 and a breakpoint on line 149, the debugger will act like I have a breakpoint on EVERY SINGLE line in between these two breakpoints. By my reading of the Intellij Docs, shouldn't it just stop at 25 and then run again until I hit 149, or must I manually resume the program run for that to be the case?

I am running Java 8 and IntelliJ Build # IU-211.7628.21 built on Jan 30, 2021, with a Runtime version of 16.0.11+9-b 1341.60 AMD64

 

0
5 comments

Here is the description of how the Step Over works: https://www.jetbrains.com/help/idea/stepping-through-the-program.html#step-over

Please let me know if something differs in your case. 

1

From the main menu, select Run | Debugging Actions | Smart Step Into or press Shift+F7 .Click the method. You can also select it using the arrow keys or tabs and press Enter / F7 .

 

skylightpaycard

0

Choose Run | Debugging Actions | Smart Step Into from the main menu or press Shift+F7 to access this option. Click the approach. Press Enter or F7 after selecting it using the arrow keys or tabs.

SkylightPaycard

0

To that end, setting a breakpoint on line 25 and another one on line 149 will cause the debugger to treat every line in between them as if it were a breakpoint. According to what I've read in the Intellij Documentation, the program should halt at 25 and continue running until I reach 149, but I can't tell if this happens automatically or if I have to resume it.myhealthatvanderbilt com

0

If you use step in/over then IDE stops on every line. Use "resume" to run till next breakpoint. 

0

Please sign in to leave a comment.