liveBook · Manning

Step Over

As explained in Learn AI-Assisted Python Programming, Second Edition

Step Over is a debugger command that advances execution to the next line in the current function without entering called functions.

Step Over advances the debugger to the next line in the current function. When that line calls another function, it runs the called function to completion without opening it line by line. In VS Code, press F10 or choose Step Over from the debug toolbar. section 8.2.2

Tracing a counting bug

Set a breakpoint in a function such as count_words, start debugging, and click Step Over to watch execution move from count = 0 to the loop and conditional. Inspect variables after each step to see whether count changes as expected. The same technique exposes a bug in most_students: stepping through the classroom rows shows count reaching 4, then the loop ending before max_count is updated. section 8.2.2 section 8.5

Listing 8.4 Incorrect count_words function for debugging
def count_words(words): 
    count = 0 
    for word in words: 
        if "dan" in word.lower(): 
            count += 1 
    return count 

words = ["Dan", "danger", "Leo"]     #1
print(count_words(words))            #1

Inspect the incorrect count_words function used to practice breakpoints, stepping, and variable observation. section 8.2.2

How Learn AI-Assisted Python Programming, Second Edition covers it

How deep it goes
Defines line advancement and called-function behavior through examples, but does not explain debugger internals.
Examples
Demonstrates count_words and most_students while tracking loop progress, counters, breakpoints, and debugger state.
What you can do after
Diagnose logic errors by advancing execution and checking variable state in the VS Code debugger.
How it connects
Contrasts with Step Into, Step Out, Continue, breakpoints, and watch expressions.

Also explained in

Compare how 2 books explain Step Over →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn AI-Assisted Python Programming, Second Edition. The section links point to the parts of the book it draws on.