liveBook · Manning

Step Into

As explained in Get Programming: Learn to code with Python

A debugger execution command that enters the called function and advances through its statements.

Step Into is a debugger command that enters the function currently being called, so you can follow its statements one at a time and inspect what happens inside. section 36.3

Finding the missing case

Set a breakpoint, start debugging, and go to that breakpoint. When a test calls absolute_value(0), click Step Into. The variable explorer shows n = 0. Stepping twice more reaches the conditional branches: n is neither less than nor greater than 0, so no return statement runs and the function returns None. section 36.3

Use Step Into when a failing test may be caused inside a function call:

  • Set a breakpoint at an appropriate line. section 36.3
  • Run the debugger and continue to the breakpoint. section 36.3
  • Step into the function and continue until the incorrect behavior becomes visible. section 36.3

How Get Programming: Learn to code with Python covers it

How deep it goes
Walks through breakpoint setup, function entry, variable inspection, and conditional execution, then reinforces the process with an exercise.
Examples
Uses absolute_value(0), the n variable, and the failing test_prime_5 case.
What it assumes
Assumes familiarity with setting breakpoints and starting debugging, while demonstrating function entry and variable inspection directly.
What you can do after
Diagnose function-level failures by tracing execution and inspecting values inside a debugger.
How it connects
Connects debugging with breakpoints, function calls, variable inspection, conditional statements, and test cases.

Also explained in

Compare how 4 books explain Step Into →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Get Programming: Learn to code with Python. The section links point to the parts of the book it draws on.