-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Debugging a test does not work in Testing
tab
#17399
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
Comments
I literally replicated what you have, and it seems to be working fine. Try enabling logs to see if something comes up. You can do this by setting
Then start debugging using test explorer. Logs should in the extension folder (~/.vscode/extensions/ms-python.python-2021.9.1230869389) with the name The above config can only be used with tests and cannot be used to debug files using the play button. If you want to debug files using the play button, you can either use the debug button at the top of the file, or add a
|
Could the problem be that I am in a remote ssh session? |
I tested this on ssh remote, it seems to be working there too. So I suspect debugger is somehow failing. The logs for ssh scenario will be under |
Apparently it seems to be working fine now, I don't know what has changed. |
For me, I had to include "version": "0.2.0" in my launch.json to get it working. That isn't included in the automatically generated launch.json. |
Environment data
python.languageServer
setting: PylanceExpected behaviour
I hit the
Testing
tab to find tests and click onDebug Test
button on any test. I expect the test to run.Actual behaviour
The testing wheel keeps turning and the test is never ran / debugged, e.g., by placing a breakpoint.
Steps to reproduce:
I have a repo structure as follows:
The contents of
somerepo.code-workspace
are:The contents of
example1/.vscode/settings.json
are:The contents of
.envrc
are:The contents of
Pipfile
are:The contents of
Pipfile.lock
are generated by runningpipenv install --dev
.The contents of
example1/src/python/example/example.py
are:The contents of
example1/test/python/example_test/test_example.py
are:The text was updated successfully, but these errors were encountered: