Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Breaking on uncaught exceptions does not behave similar to breaking on raised exceptions #91

Closed
DonJayamanne opened this issue Feb 16, 2018 · 0 comments

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Feb 16, 2018

def one():
    try:
        raise ArithmeticError()
    except ArithmeticError:
        print("handled")
    raise ArithmeticError()
one()

Scenario 1

  • Ensure Raised Exceptions is selected
  • Debug and VS Code will break on line 3 and a Red message "PAUSED ON EXCEPTION" is displayed
  • User now knows there's an exception

Message received by VS Code:

{"body": {"reason": "exception", "threadId": 3}, "type": "event", "event": "stopped", "seq": 6}

scenario1

Scenario 2

  • Ensure Raised Exceptions is not selected and Uncaught Exceptions is selected
  • Debug and VS Code will break on line 5 and a message "PAUSED ON PAUSE is displayed
  • Not a meaningful break reason (it should indicate it broke due to an exception)

Message received by VS Code:

{"body": {"reason": "pause", "threadId": 3}, "type": "event", "event": "stopped", "seq": 6}

scenario2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant