-
Notifications
You must be signed in to change notification settings - Fork 144
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
"List index error out of range" when debugger breaks on uncaught exception #1745
Comments
That error looks like a bug in Python itself, not the debugger. The traceback module shouldn't throw an exception when asking for a format. |
Maybe the exception you're throwing has something to do with the issue. Can you provide a code sample? |
The raised exception error is expected when you have 'justMyCode' set to false. That's an internal error that is always thrown when running. |
Thanks, I can reproduce the issue with your query exception. It looks like a bug here:
That code needs to make sure the line numbers are not none before adding it to the summary. |
Actually, it was slightly more complicated. Not sure how this worked in 3.11 and 3.12 but the frame summaries we were generating didn't have the correct line text. |
Thanks for this fix! Just yesterday I ran into this as well when debugging some python code suffering from a circular import chain. I just monkey-patched the installed |
Environment data
Actual behavior
When the debugger breaks on an exception, the following output appears in the terminal:
Expected behavior
The output distracts. Also, there might be functional degradation.
Steps to reproduce:
In Visual Studio Code, enable "halt on exception", F5-debug a file that throws an exception
The text was updated successfully, but these errors were encountered: