[IPython-User] Magic functions during debugging sessions

Thomas Kluyver takowl@gmail....
Fri Jan 4 14:42:14 CST 2013


Hi Cassio,

On 4 January 2013 18:37, Cássio M. M. Pereira <cassiomartini@gmail.com>wrote:

> Is there a way to make the magic functions, such as %timeit available
> during debugging sessions?
>
> For instance, I usually import pdb (or ipdb) and use pdb.set_trace(),
> which makes IPython drop into the pdb> prompt. I'd like to be able to
> use magic functions such as %timeit also on the debug prompt.
>

Specific magic functions can be exposed in ipdb - we expose the pinfo
family by default, see here:
https://github.com/ipython/ipython/blob/master/IPython/core/debugger.py#L488

You should be able to hack your own copy to expose timeit, following that
example.

Best wishes,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130104/fe11ccd1/attachment.html 


More information about the IPython-User mailing list