Thursday 4 July 2013

Using %debug with ipython notebook!

:)

Run the notebook.  Get connection details with,

In [315]: connect_info


{ "stdin_port": 54645, "ip": "127.0.0.1", "hb_port": 37889, "key": "12dafc68-dff1-4e17-a4be-58fb059cc198", "shell_port": 52893, "iopub_port": 35633 } Paste the above JSON into a file, and connect with: $> ipython --existing or, if you are local, you can connect with just: $> ipython --existing kernel-0b0b2631-03c4-4d7b-8f7b-a18bc76e976d.json or even just: $> ipython --existing if this is the most recent IPython session you have started.

and open a second terminal. Connect to the existing notebook server with,

ipython qtconsole --existing kernel-0b0b2631-03c4-4d7b-8f7b-a18bc76e976d.json

and the new window pops up with %debug ability.

The easiest way, I found, was to type,


$ ipython qtconsole --existing

No comments:

Post a Comment