New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add Debugging features #1537
Conversation
Ohhhhhhh niiiiiice!!!!! Tried it out and it's awesome \o/ Oh and it LGTM |
What other funcs are you planning on adding? |
Glad you like it :). I was thinking about the possibility of setting breakpoints to specific lines (with a nice fringe indicator). It may worth looking at what other IDE do to get some additional ideas. |
aae4553
to
2717990
Compare
b9e535a
to
237f6d7
Compare
This reverts commit 2598977.
237f6d7
to
d97e919
Compare
Finally done. |
Thanks a lot for this feature! There is one problem I ran into and maybe someone with more experience could help with: KeyError Traceback (most recent call last) ~/.virtualenvs/memory/lib/python3.7/site-packages/IPython/core/displayhook.py in call(self, result) ~/.virtualenvs/memory/lib/python3.7/site-packages/IPython/core/displayhook.py in update_user_ns(self, result) KeyError: '_oh' I have looked a little bit online for more information and it seems this may have something to do with: ipython/ipython#136 although perhaps not exactly the same issue. I think it's a ipython specific problem since it works normally when I use the python interpreter shell instead. I think it should be possible to fix this because if I set the breakpoint instead "manually" with 'import pdb; pdb.set_trace()' then everything works fine, i.e. after exiting the pdb shell the ipython shell is still useable. Here is a minimal script to try and reproduce the problem:
And here is the workflow that yields the error:
Any suggestions for how to fix this appreciated. Thanks! |
Hi, I could not reproduce this with IPython on mine. Could you create a new issue with your Elpy configuration and OS so I can investigate a bit further ? |
PR Summary
Add functions to ease debugging.
elpy-pdb-toggle-breakpoint-at-point
: set (or unset) a breakpoint at the current line.elpy-pdb-clear-breakpoints
: clear all breakpoint in the buffer.elpy-pdb-debug-buffer
: start pdb on the current bufferelpy-pdb-break-at-point
: start pdb on the current buffer and jump to the current lineelpy-pdb-debug-last-exception
: start post mortem pdb on the last exceptionTodo: