-
Notifications
You must be signed in to change notification settings - Fork 299
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
IndentationError: unexpected indent when trying to "Debug cell" on indented code #1287
Comments
Yes the breakpoint statement is breaking this. I believe we'd have to indent it as well. |
There seems to be a slight regression on this issue. As a workaround I used to be able to manually attach to the kernel, set breakpoints, and then use CTRL+ENTER on cells and achieve similar behaviour as the "Debug Cell" command, even when working with remote jupyter servers. In the latest release, once VSCode is in debug mode after attaching, running CTRL+ENTER on cells results in the same I believe that if my code is indented that leaves me unable to debug cells with remote kernels - since as far as I understand using the regular "Debug Cell" command is not supported with remote kernels. Any idea for another workaround involving indented code? |
The breakpoint statement is still sent, you just can't see it anymore (we fixed a bug with computing hash value for the entered text). However you should be turn off the first breakpoint with this setting: That means we won't break on enter for a cell. So you'll have to put your own breakpoints. |
Thank you for filing this bug, given taht we haven't had enough users report this bug and the fact taht its more of an edge case, with only 3 users reporting this in the past 4 years, I'm closing this for now as wont fix. |
Bug: Notebook Editor, Interactive Window, Python Editor cells
Steps to cause the bug to occur
Actual & Expected behavior
The result cell in the Python Interactive window:
Expected behavior is for this to work (despite the indentation of the code in the cell). Indeed, running the "Run Cell" action actually works well! This is extremely useful working with hybrid code/notebook files. So sometimes you have in a
code.py
file for instance:and you want to work in the inside of the function interactively so you would make it:
That would make it possible to either call the code as the function or work on the contents interactively by evaluating/debugging the middle cell - extremely useful. I'm guessing this has to do with the
breakpoint()
statement added by the extension when "Debugging" cells.Your Jupyter and/or Python environment
Possibly related microsoft/vscode-python#6680
The text was updated successfully, but these errors were encountered: