-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
The stack trace takes too much space when breaking on an exception #2075
Comments
Unfortunately there's really nothing we can do about this. As this is a UI issue in VSC. |
@karthiknadig @DonJayamanne just-my-code should help here, can we verify we hide most of the stdlib in the exception stack? |
No, just-my-code is about code-stepping and breaking on exceptions. We should not remove stdlib frames from the call stack. We only remove the debugger frames since they are not relevant to user code. |
Just did some testing, a couple of thoughts. First: previously we did not show the call stack in the exception message, since the call stack is also shown in the call stack window. My vote would be to remove the call stack from the exception message. If we want the stack in the exception message, then we should track this as an upstream issue and open an issue on vscode to make this error dialog have a max height and be scrollable. It is indeed overwhelming for even the simplest of apps, see below before/after screenshot for a simple flask app. Secondly, we DO hide the stdlib frames from the call stack when debugstdlib is on (both in the old and new debugger), this is how JMC in Visual Studio works. Third, in the future we should consider adding a flavor of just my code that disables debugging in site packages. Files in the site packages folder are not my code, so perhaps we should leave the option named as debugstdlib until we have true support for JMC. |
Filtering of stack trace for just my code is a separate issue. So the decision we need to make is:
|
I think my preference here:
...would be to not limit it at all, or limit it by using a 'collapse' style visualization where the last N lines are shown, but all the lines in the stack trace are available by 'un-collapsing' it. |
This is something VSC will have to do, out of our hands. |
Also let's keep in mind the full stack trace is shown in the call stack window, so filtering to the last ~20 lines with "... see the debug tab for the full call stack" would be a fine solution! |
This requires an upstream change, as well as a change in the Python extension. Both changes (extension and PTVSD) need to be done together |
Please note that there is no way to close that gigantic red stack trace dialog either - it auto-closes only when the debugger is stopped, which is not often desirable (esp. since variable values are then lost). So that big red box is very much in the way whilst debugging. My vote is to shrink the error report content back to minimal size (20 lines would still be far too much), but add concise, clear instructions for how to open the call stack window to view the full stack trace. Note that there is also a StackOverflow question (with bounty) on this very issue. |
@DonJayamanne the fix for this is in |
Fixed upstream, closing in favour of #5117 |
This is from Survey feedback:
The text was updated successfully, but these errors were encountered: