gregsexton / ob-ipython

org-babel integration with Jupyter for evaluation of (Python by default) code blocks
737 stars 111 forks source link

Using ipdb or pdb inside a source block #216

Open jsigman opened 4 years ago

jsigman commented 4 years ago

Is it possible to use the debugger in a source block, in the same way that you can for jupyter?

I get the following error:

StdinNotImplementedError: raw_input was called, but this frontend does not support input requests.

When I use

        __import__("ipdb").set_trace()

In an org block with this header

#+begin_src ipython :session :exports both :results raw output drawer :async t

aksarkar commented 2 years ago

It is only possible to call into pdb in synchronous blocks (i.e., without :async t).