Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Neil Cerutti Newsgroups: comp.lang.python Subject: Re: Function call arguments in stack trace? Date: 7 Jun 2011 18:23:51 GMT Organization: Norwich University Lines: 25 Message-ID: <9578lmFl76U1@mid.individual.net> References: <9d344c45-8017-4c80-9a17-bc7accd81047@l26g2000yqm.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net CsTly10wiw6i3Th3QhpN3QDawjA7PRkpBK0BDEs83BtgcAi+1N Cancel-Lock: sha1:Q8uJ/yVbhPixwujQFgSs48tKW4M= User-Agent: slrn/0.9.9p1/mm/ao (Win32) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:7170 On 2011-06-07, Dun Peal 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