jupyter_console icon indicating copy to clipboard operation
jupyter_console copied to clipboard

Attaching a Jupyter console for remote introspection/debugging?

Open sjdv1982 opened this issue 5 years ago • 0 comments

I have an asyncio-based server application. During development I can do live introspection and debugging using ipython:

ipython -i server.py -- [server args]

While during production, I do something like

python server.py --run-forever  [server args]

(where --run-forever does asyncio.get_event_loop().run_forever() at the end of the server script)

It would be very nice if during production, I could still attach (remotely) a Jupyter console to that (or multiple consoles), using jupyter console --existing.

The trouble is, I can't see how to launch a proper ipykernel in the first place.

jupyter console server.py -- --run-forever [server args] does not work,

nor does ipython kernel -i server.py -- [server args].

Is this supported by either? Or do I need to write my own ipykernel.kernelapp subclass?

sjdv1982 avatar Feb 12 '20 15:02 sjdv1982