Function call arguments in stack trace?
Neil Cerutti
neilc at norwich.edu
Tue Jun 7 14:23:51 EDT 2011
On 2011-06-07, Dun Peal <dunpealer at gmail.com> wrote:
> 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!
Use pdb.
--
Neil Cerutti
More information about the Python-list
mailing list