{"record":{"id":"f618481f90d999af","repo":"go-delve/delve","slug":"nothing-to-stepout-to","errorCode":null,"errorMessage":"nothing to stepout to","messagePattern":"nothing to stepout to","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/target_exec.go","lineNumber":599,"sourceCode":"\n\tsameGCond := sameGoroutineCondition(dbp.BinInfo(), selg, curthread.ThreadID())\n\n\tif backward {\n\t\tif err := stepOutReverse(dbp, topframe, retframe, sameGCond); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tsuccess = true\n\t\treturn grp.Continue()\n\t}\n\n\tdeferpc, err := setDeferBreakpoint(dbp, nil, topframe, sameGCond, false)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif topframe.Ret == 0 && deferpc == 0 {\n\t\treturn errors.New(\"nothing to stepout to\")\n\t}\n\n\tif topframe.Ret != 0 {\n\t\ttopframe, retframe := skipAutogeneratedWrappersOut(grp.Selected, selg, curthread, &topframe, &retframe)\n\t\tretFrameCond := astutil.And(sameGCond, frameoffCondition(retframe))\n\t\tbp, err := allowDuplicateBreakpoint(dbp.SetBreakpoint(0, retframe.Current.PC, NextBreakpoint, retFrameCond))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif bp != nil {\n\t\t\tconfigureReturnBreakpoint(dbp.BinInfo(), bp, topframe, retFrameCond)\n\t\t}\n\t}\n\n\tif bp := curthread.Breakpoint(); bp.Breakpoint == nil {\n\t\tcurthread.SetCurrentBreakpoint(false)\n\t}\n","sourceCodeStart":581,"sourceCodeEnd":617,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/target_exec.go#L581-L617","documentation":"Raised by TargetGroup.StepOut when it cannot determine any destination to step out to: the topmost frame has no return address (topframe.Ret == 0) and no deferred-call breakpoint could be set (deferpc == 0). Delve has nowhere to place the return breakpoint, so stepping out is impossible from this state.","triggerScenarios":"StepOut called with the goroutine stopped in a frame lacking a resolvable return address (e.g. runtime/bootstrapping frames, frames without proper frame pointer info) and setDeferBreakpoint yields 0 (no deferred call at top frame).","commonSituations":"Stepping out of runtime functions or deeply optimized frames; stopping at the outermost frame (thread entry) where there is no caller to return to; binaries compiled without frame pointers causing frame recovery failure.","solutions":["Continue until the goroutine is in normal user code, then StepOut","Use Next/Step or set an explicit breakpoint at the desired return location instead","Rebuild with optimizations disabled (-gcflags='all=-N -l') for reliable frame info","Check that you're stepping out of the intended goroutine/frame (use stack command)"],"exampleFix":"// before\n// stopped inside runtime.gopark\nerr := grp.StepOut() // 'nothing to stepout to'\n// after\nbp, _ := dbp.SetBreakpoint(0, callerPC, UserBreakpoint, nil)\n_ = grp.Continue() // breakpoint at explicit destination instead","handlingStrategy":"try-catch","validationCode":"frames, _ := dbp.Stack(0, 20)\ntop := frames[0]\nif top.Ret == 0 && top.Current.File startsWith(\"runtime/\") {\n    // stepout not viable; use breakpoint at caller instead\n}","typeGuard":null,"tryCatchPattern":"if err := grp.StepOut(); err != nil && err.Error() == \"nothing to stepout to\" {\n    // set explicit breakpoint at caller PC and continue instead\n}","preventionTips":["Avoid StepOut from runtime/bootstrap frames","Verify stack frames resolve (Ret != 0) before stepping out","Build with -gcflags='all=-N -l' for reliable frame info"],"tags":["go","debugger","stepout","stack-frames"],"backgroundTag":"no-return-address-available","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}