-
Notifications
You must be signed in to change notification settings - Fork 281
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
Implement full notebook debugger #1652
Comments
Thanks for the feature request! We will discuss this at our weekly triage. In the meantime, we do have an experimental feature called Run By Line which provides debugger-like functionality for notebook cells, specifically by allowing you to step through a cell line-by-line and watch how variables in the kernel change via the variable panel. You can turn the feature on by opening your settings.json and adding the following value:
|
One interesting thing to see is how to be able to jump to Or maybe an embedded tab as the variables tab. |
Is this already implemented or public in latest version of vscode? |
@tyoc213 Hi! Full cell debugging is not yet available in the preview native notebooks editor, but Run By Line (a lite debugger that allows you to execute code cells and view variable state line by line) is available in the webview based notebook editor. Run By Line feature parity in the preview native notebooks editor is on our roadmap. This is what Run By Line looks like in the webview based notebook editor: |
If I were to contribute to help resolve this particular issue, where would I start? I've already read the 'contributing guide'. |
What were you thinking of contributing? Our plans for debugging are:
|
I would love to be able to debug my .ipynb files exactly the same way as you can do with .py files - set a breakpoint, step into functions etc. |
Have you tried the run by line support? It's really single cell debugging (you can't step into other cells or into other modules) so not sure if you mean that it isn't sufficient for what you want. |
It is not sufficient. The most important part for me is stepping into functions. |
Can you log a bug for this then? We argued back and forth when implementing Run By Line whether people wanted to step out of cells. If we get enough up votes (or if you want to implement stepping into functions) we might change how it works. |
I don't understand 'log a bug'.
If someone has similar workflow you can leave an upvote to signal that full debugging would make your life easier. |
Create a new issue with your reasons for why run by line is insufficient. We have no plans to implement 'full' debugging of ipynb files like the xeus kernel supports in jupyter. However if enough people say that Run by line is not what they want, we'll have a reason to implement it. |
So the original request was already discarded then? |
The original request was intended to be handled by the Run by line functionality. If Run by line isn't sufficient, I think it would make more sense to log a different bug explaining why so other people can complain about that specifically. |
I see, I took the first comment #1652 (comment) as current workaround and though people where working on the request because this issue was not closed. I think if I make another issue, will be the same than this one "full debug support" because there is no debug from a cell, for example one important feature of full debug is that it will allow to put breakpoints in modules in the current search path that are used on the ipynb. The workflow #1652 (comment) is an example of the go back and forth between ipynbs and py as a workaround but that takes time and I'm sure that is what ppl normally do when they really want to debug some ipynb cells. |
Any update on this? |
This is not being actively worked on. It's under consideration but other things are currently in front of it right now. We really need to have a roadmap somewhere. |
I think there's 3 levels of things we can do here:
|
Thanks for your answer. PS: the spyder jupyter notebook extension supports %pdb - no clue if there is some code that can be taken from there, but it just works! https://github.com/spyder-ide/spyder-notebook |
About the notebook debugger. Jupyter team has recently implemented it Xues Python as per the below Jupyter blog can now do this. PyCharm Professional provides this out of box. |
Sorry for asking here, but it's probably better than creating a potentially duplicated issue. I find it very confusing that I can indeed set a breakpoint in a cell: But when I run the cell it's not hit and it seems to be no specific option to explicitly debug the cell otherwise. Is this supposed to work? |
Ok, forget about that, I realized there is an experimental option to enable what's called "Run by line", very nice. The ability to set useless breakpoints is perplexing anyway, but if this experiment is going to be enabled soon by default maybe there's no point in polishing that rough edge. |
Hi @memeplex! Run by line is now active by default on the latest Jupyter extension and VS Code. The difference between Run by Line and Let me know if you have any more questions. |
Hi, there is now a 'full debugger' implemented in VScode jupyter notebooks, but pdb is still not supported - is this on the roadmap? Is there an experimental feature that can be enabled? Thanks! |
@m-beau |
@m-beau , have you created a pdb issue yet? otherwise I might. I'm also trying to transition from spyder, but letting go of their debugging interface is not really feasible. Right now I have a suboptimal workflow where I write most things in VScode, and then switch to spyder when things break.... |
October milestone
stopOnFirstLineWhileDebugging
respected in the new run by line #7263Closed
Feature: Notebook Editor
Original issue description
Been able to debug ipynb cells
I know I can debug "cells" from within a .py file as
Bu there is no way to launch debug like this from a cell in a ipynb
It would love to launch the debugger "normally" with a button, if the breakpoints are not respected in the cells, at less, if they are in other .py that code has access at the moment because "in the working directory" would love that those breakpoints are respected as normal .py.
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer
The text was updated successfully, but these errors were encountered: