Skip to content

SystemExit while debugging unit test method #3201

Closed

Description

Environment data

  • VS Code version: 1.28.2
  • Extension version (available under the Extensions sidebar): 2018.9.2
  • OS and version: macOS Mojave 10.14
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.2
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: pytest 3.6.0

Actual behavior

When I run Debug unit test method... and choosing the test to debug it opens testlauncher.py and shows this message:

Exception has occurred: SystemExit
0
  File "~/.vscode/extensions/ms-python.python-2018.9.2/pythonFiles/experimental/testlauncher.py", line 58, in run
    pass
  File "~/.vscode/extensions/ms-python.python-2018.9.2/pythonFiles/experimental/testlauncher.py", line 64, in <module>
    run(cwd, testRunner, args)

Expected behavior

Start debugging 😄

Steps to reproduce:

  1. Open command palette
  2. Run Python: Debug unit test method...
  3. Choose a method to run

Logs

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

Starting Microsoft Python language server.
##########Linting Output - pylint##########
************* Module testlauncher
23,8,error,E0611:No name 'debugger' in module 'ptvsd'
23,8,error,E0401:Unable to import 'ptvsd.debugger'
26,8,error,E1101:Class 'traceback' has no 'print_exc' member
26,8,error,E0602:Undefined variable 'traceback'
22,8,warning,W0612:Unused variable 'ptvsd'
54,12,error,E0401:Unable to import 'nose'

------------------------------------------------------------------
Your code has been rated at 1.88/10 (previous run: 1.88/10, +0.00)

Microsoft Python Language Server version 0.1.50.0
Initializing for ~/path/to/project/venv/bin/python
##########Linting Output - pylint##########

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

##########Linting Output - pylint##########
************* Module testlauncher
23,8,error,E0611:No name 'debugger' in module 'ptvsd'
23,8,error,E0401:Unable to import 'ptvsd.debugger'
26,8,error,E1101:Class 'traceback' has no 'print_exc' member
26,8,error,E0602:Undefined variable 'traceback'
22,8,warning,W0612:Unused variable 'ptvsd'
54,12,error,E0401:Unable to import 'nose'

------------------------------------------------------------------
Your code has been rated at 1.88/10 (previous run: 1.88/10, +0.00)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

No output

Activity

  1. brettcannon commented on Nov 6, 2018

    @brettcannon
    Member

    Did you have ~/.vscode/extensions/ms-python.python-2018.9.2/pythonFiles/experimental/testlauncher.py open to get those linting errors?

  2. pniedzwiedzinski commented on Nov 6, 2018

    @pniedzwiedzinski
    Author

    No, it opens as I am starting debuging

  3. DonJayamanne commented on Nov 8, 2018

    @DonJayamanne
  4. piotr-kubica commented on Nov 24, 2018

    @piotr-kubica

    I'm experiencing exactly same issue as butterfly-pn

  5. 17 remaining items

  6. ericsnowcurrently commented on Apr 3, 2019

    @ericsnowcurrently

    FYI, the fix was merged into PTVSD yesterday morning. Karthik Nadig (@karthiknadig), we're good to go, right?

  7. karthiknadig commented on Apr 3, 2019

    @karthiknadig
    Member

    Yes. The fix is in master.

  8. ericsnowcurrently commented on Apr 3, 2019

    @ericsnowcurrently

    Don Jayamanne (@DonJayamanne), shouldn't we also remove all references to DONT_DEBUG in the various debug adapter scripts?

  9. DonJayamanne commented on Apr 3, 2019

    @DonJayamanne

    shouldn't we also remove all references to DONT_DEBUG in the various debug adapter scripts?

    Yes agreed.

  10. karrtikr commented on Apr 8, 2019

    @karrtikr

    Validated

  11. ghost removed on Apr 8, 2019
  12. locked as resolved and limited conversation to collaborators on May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-debuggingarea-testingbugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priority

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions