pdb, the default Python debugger, has an undocumented (?) retval
command that prints the return value of the current function if you already computed it and are one step away from returning back to the caller frame.
Is there similar functionality in the graphical Winpdb debugger? I can't find the return value anywhere and it does not recognize retval as a command.
By the way, I know I could just add an intermediary variable and inspect that instead but I would like to avoid having to edit the code I'm debugging, specially when its from a third party library.
#original code
def f(x):
return x+1
#debugging code
def f(x):
r = x+1
return r
Finally, I'm also open to alternative debuggers as long as they have a GUI, run on Linux and don't come bundled inside an IDE.