-
Notifications
You must be signed in to change notification settings - Fork 13
Debugging
Edward Banner edited this page Jun 5, 2018
·
3 revisions
Inevitably you will run into an error in pynt. If you want to figure out for yourself what the problem is then I hope this material will guide you.
Run the following function.
M-x pynt-toggle-debug
This will enable pynt logging as well as EIN logging.
Open the *Messages*
, *ein:log-all*
and *ein:jupyter-server*
buffers and then run do the thing that causes the bug. pynt logging goes to the first buffer, EIN logging goes to the second buffer, and jupyter notebook server output goes to the last buffer.
If you can't discern the problem from logs then you can use the emacs debugger. Here are the steps you would go through for that.
-
M-x toggle-debug-on-error
so you can find out which function is causing the error. -
M-x describe-function RET <function>
and then click on the link to the source. -
M-x eval-defun
and supply the universal keyword argument. - Call the function again to enter into edebug. Do
edebug-step-mode
(bound tos
in spacemacs) enough times to get to the error. Hopefully you now know why the problem arose.