To debug a warning observed in my code, Im trying to find a way to programmatically identify the stack of functions being called by my code.
As an example
def func(x):
return func2(x+4)
def func2(x):
return x*3
func(5)
For the above code I want to see something like
func(5)
- func2(9)
pdb(and other debuggers) can do that (comments added):Also see the
inspectmodule and in particular the interpreter stack for functions that can access the call stack programmatically.