Function call arguments in stack trace?

Dun Peal dunpealer at gmail.com
Tue Jun 7 14:09:54 EDT 2011


Hi,

In a stack trace, is it possible to somehow get the arguments with
which each function was called?

So for example, if function `foo` in module `bar` was called with
arguments `(1, [2])` when it raised an exception, then instead of:

    Traceback (most recent call last):
      File "bar.py", line 123, in foo
        build_rpms()

The stack trace would read:

    Traceback (most recent call last):
      File "bar.py", line 123, in foo(1, [2])
        build_rpms()

This would save a lot of debugging time!

Thanks, D.



More information about the Python-list mailing list