-
Notifications
You must be signed in to change notification settings - Fork 137
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
Just my code exclusions will require a double step to step into excluded code #224
Comments
Same thing happens on the last line of a file if you step into it (F11). It will step twice. |
As a note, the tricky thing is that on a step in, the debugger actually stops when doing a return from a previous call (because on some situations if we don't stop at the This needs some investigation to check how we could handle both scenarios. |
We've had half-steps before in some cases. We should fix this if it's straightforward, but given that the workaround is also trivial (just step again!), it's not worth it spending too much time on this. |
This will actually result in a pretty poor experience for our run-by-line scenario. I'd really like to get this fixed for the first release of that feature (June) |
Just this particular case? Keep in mind that there will be others in which step doesn't actually step over the entire line. |
I think mainly this case, though I'm interested to know what other cases there might be. The idea here is that run-by-line is super simple and highly geared toward executing each line of only the current cell. The data scientists who make use of this don't have a notion of what step-into vs step-over is, so when they experience this strange behavior, they won't likely be able to make sense of what might be happening under the covers. Even as a virtual debugger expert, I found it disconcerting myself as I was stepping with the button. Sometimes, I would click and nothing would happen. But I wasn't sure if it was because I didn't actually click? or whether I clicked and the line did move I just didn't notice? Or whether it just didn't work? When I'm focused on the variables window to watch the the value change or I move your eyes to the button to click (and take them off the code), I necessarily become partially distracted from what exactly I might be stepping and am focused on seeing a change based on what I expect the step to do. However, when I step and nothing occurs, I'm left wondering what just happened. It breaks my concentration about what I was trying to understand about the state of my program after I step. If this truly is going to be risky to fix or tricky to deal with then I guess it would be ok to at least ship this way initially. But if getting at least this bug's repro scenario to work as desired is relatively safe, then I would really like to see it happen. :) |
I'll take a look into it as my next task then. |
@fabioz, can you do some research on what it'd take to fix first? If takes a major change to the stepping code to handle it well in some scenarios, we'll need to balance more polished UX against the amount of work necessary to make that happen, and potential destabilization. For the ones that have an easy fix - and hopefully this particular repro is one of them! - let's just go ahead and fix them. |
…om a skipped function. Fixes microsoft#224
…om a skipped function. Fixes microsoft#224
Environment data
Steps to reproduce:
Create three files:
baz.py
foo.py:
test.py:
Setup debug config to exclude baz, but include foo and test.
Debug test.py and step into every call.
Actual behavior
It takes two steps to get over baz.baz()
Expected behavior
It takes one step.
The text was updated successfully, but these errors were encountered: