diff --git a/pudb/debugger.py b/pudb/debugger.py index 6660e47..5e69abc 100644 --- a/pudb/debugger.py +++ b/pudb/debugger.py @@ -382,10 +382,8 @@ class Debugger(bdb.Bdb): def user_return(self, frame, return_value): """This function is called when a return trap is set here.""" - if frame.f_code.co_name == '': - return - - frame.f_locals['__return__'] = return_value + if frame.f_code.co_name != '': + frame.f_locals['__return__'] = return_value if self._wait_for_mainpyfile: if (self.mainpyfile != self.canonic(frame.f_code.co_filename)