Skip to content

Option to not consider SystemExit as an uncaught exception #1306

Open

Description

It would be nice to be able to not consider SystemExit as an uncaught exception.

I think by definition it should not be considered an uncaught exception anyway, since it probably isn't recommended to ever catch a SystemExit, but if I'm wrong, then it being configurable would be a great compromise.

Having looked for preexisting feature requests, these are the closest I could find:

microsoft/vscode#91822
microsoft/vscode-python#850
microsoft/vscode-python#5584

The closed one (microsoft/vscode-python#850) seems to be a much broader feature request, and I don't think this issue is a duplicate.

If you do consider it a duplicate, then this is a fast close, but I am personally running out of ideas how to solve this issue, so out of desperation, I am trying to convince you it is not a duplicate.

There is also https://stackoverflow.com/questions/52372810/visual-studio-code-python-debugging-exception-has-occurred-systemexit

Quoting the linked StackOverflow:

Console applications returning non 0 exit code is not an Exception or necessarily an error. – sny Aug 23, 2021 at 7:15

Changing the behavior of an application to work around an IDE limitation is not a good solution. – Matt S Dec 31, 2021 at 18:00

One could also just disable the error breakpoints completely, but that is not an ideal solution for me either.

One could also try to solve this on pytest side, but that is a dead-end as well pytest-dev/pytest#1969

I am open to any other workaround suggestions too, if there is a better way to solve this than making the change in the extension.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions