Repository navigation
SystemExit while debugging unit test method #3201
Copy link
Copy link
Closed
Labels
area-debuggingarea-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityIssue identified as high-priority
Milestone
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:
- Open command palette
- Run
Python: Debug unit test method... - 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
Reactions are currently unavailable
Metadata
Metadata
Labels
area-debuggingarea-testingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityIssue identified as high-priority
Activity
brettcannon commentedon Nov 6, 2018
Did you have
~/.vscode/extensions/ms-python.python-2018.9.2/pythonFiles/experimental/testlauncher.pyopen to get those linting errors?pniedzwiedzinski commentedon Nov 6, 2018
No, it opens as I am starting debuging
DonJayamanne commentedon Nov 8, 2018
Upstream issue: microsoft/ptvsd#1268 (was microsoft/ptvsd#997).
piotr-kubica commentedon Nov 24, 2018
I'm experiencing exactly same issue as butterfly-pn
17 remaining items
ericsnowcurrently commentedon Apr 3, 2019
FYI, the fix was merged into PTVSD yesterday morning. Karthik Nadig (@karthiknadig), we're good to go, right?
karthiknadig commentedon Apr 3, 2019
Yes. The fix is in master.
ericsnowcurrently commentedon Apr 3, 2019
Don Jayamanne (@DonJayamanne), shouldn't we also remove all references to DONT_DEBUG in the various debug adapter scripts?
DonJayamanne commentedon Apr 3, 2019
Yes agreed.
Ignore the extension's Python files when debugging. (#5103)
karrtikr commentedon Apr 8, 2019
Validated
Minor change to .gitignore; need to use separate test files for now b…