Show More
@@ -132,15 +132,31 b' console, is that it can not run any code that expects input from the kernel' | |||
|
132 | 132 | that the ``%debug`` magic does *not* work in the notebook! We intend to |
|
133 | 133 | correct this limitation, but in the meantime, there is a way to debug problems |
|
134 | 134 | in the notebook: you can attach a Qt console to your existing notebook kernel, |
|
135 |
and run ``%debug`` from the Qt console. |
|
|
136 | terminal where you started the kernel that read something like:: | |
|
135 | and run ``%debug`` from the Qt console. If your notebook is running on a local | |
|
136 | computer (i.e. if you are accessing it via your localhost address at | |
|
137 | 127.0.0.1), you can just type ``%qtconsole`` in the notebook and a Qt console | |
|
138 | will open up connected to that same kernel. | |
|
139 | ||
|
140 | In general, the notebook server prints the full details of how to connect to | |
|
141 | each kernel at the terminal, with lines like: | |
|
137 | 142 | |
|
138 | 143 | [IPKernelApp] To connect another client to this kernel, use: |
|
139 | [IPKernelApp] --existing --shell=53328 --iopub=53817 --stdin=34736 --hb=45543 | |
|
144 | [IPKernelApp] --existing kernel-3bb93edd-6b5a-455c-99c8-3b658f45dde5.json | |
|
145 | ||
|
146 | This is the name of a JSON file that contains all the port and validation | |
|
147 | information necessary to connect to the kernel. You can manually start a | |
|
148 | qt console with:: | |
|
149 | ||
|
150 | ipython qtconsole --existing kernel-3bb93edd-6b5a-455c-99c8-3b658f45dde5.json | |
|
151 | ||
|
152 | and if you only have a single kernel running, simply typing:: | |
|
140 | 153 | |
|
141 | and then start a qt console pointing to that kernel:: | |
|
154 | ipython qtconsole --existing | |
|
142 | 155 | |
|
143 | ipython qtconsole --existing --shell=53328 --iopub=53817 --stdin=34736 --hb=45543 | |
|
156 | will automatically find it (it will always find the most recently started | |
|
157 | kernel if there is more than one). You can also request this connection data | |
|
158 | by typing ``%connect_info``; this will print the same file information as well | |
|
159 | as the content of the JSON data structure it contains. | |
|
144 | 160 | |
|
145 | 161 | |
|
146 | 162 | Text input |
General Comments 0
You need to be logged in to leave comments.
Login now