liveBook · Manning

Step Out

As explained in Troubleshooting Java, Second Edition

Step out is a debugger navigation operation that resumes debugger execution until it returns from the current scope to the previous one.

Step out resumes execution until the current method returns, taking you back to the method that called it. It closes the current investigation layer in the execution stack trace. section 2.2.2

Use step out when:

  • You stepped into a method such as extractDigits() and have learned enough to return to decode(). section 2.2.2
  • You cannot explain an instruction; stop, add a breakpoint at the first unclear line, and begin a focused investigation. section 2.4

Returning from a nested investigation

Pause at var digits = new StringDigitExtractor(s).extractDigits();, then step into extractDigits() to inspect its logic. When the method is understood, step out to return to decode() instead of tracing each remaining instruction. section 2.2.2

How Troubleshooting Java, Second Edition covers it

How deep it goes
Explains the operation, stack effect, and time-saving rationale, but defers debugger implementation details.
Examples
Demonstrates returning from extractDigits() to decode() after inspecting StringDigitExtractor code.
What it assumes
Assumes a paused debugger and basic method navigation, while teaching how calls form investigation layers.
What you can do after
Diagnose/debug with it by exiting unnecessary call-depth and resuming investigation in the calling method.
How it connects
Connects step out with debuggers, execution stack traces, breakpoints, step into, and step over.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Troubleshooting Java, Second Edition. The section links point to the parts of the book it draws on.