Skip to content
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

Code lenses disappear when debugging tests with sys.exit(0) #3530

Closed
reece-bennett opened this issue Dec 2, 2018 · 3 comments
Closed

Code lenses disappear when debugging tests with sys.exit(0) #3530

reece-bennett opened this issue Dec 2, 2018 · 3 comments
Assignees
Labels
area-debugging feature-request Request for new features or functionality important Issue identified as high-priority

Comments

@reece-bennett
Copy link

Environment data

  • VS Code version: 1.29.1
  • Extension version (available under the Extensions sidebar): 2018.11.0
  • OS and version: Windows 10 1803
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.1
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pipenv
  • Relevant/affected Python packages and their versions: N/A

Actual behavior

The debugger breaks on an uncaught exception on the following:

import sys
sys.exit(0)

Expected behavior

The program should exit without an exception.

Steps to reproduce:

  1. Debug the above code with "Breakpoints: Uncaught exceptions" checked.

microsoft/PTVS#4713 related?

@brettcannon brettcannon added feature-request Request for new features or functionality area-debugging needs decision labels Dec 3, 2018
@brettcannon
Copy link
Member

The problem is that sys.exit() works by raising the SystemExit exception, so this is expected behaviour. I'll consider this a feature request to have an option to ignore SystemExit.

@jordansavant
Copy link

This would be so nice if this is released soon! Thanks for working on this stuff guys

@DonJayamanne DonJayamanne self-assigned this Dec 17, 2018
@DonJayamanne DonJayamanne changed the title Debugger breaks on sys.exit(0) Code lenses disappear when debugging tests with sys.exit(0) Dec 17, 2018
@DonJayamanne
Copy link

Closing as a dup of #3201

@lock lock bot locked as resolved and limited conversation to collaborators Jan 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging feature-request Request for new features or functionality important Issue identified as high-priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants