Repository navigation
Description
Type: Bug
Behaviour
When I click on the the "test explorer" UI icon, in order to trigger discovery of python tests in my projects (I am using a multi-root workspace), it shows like it starting, but never ends.
No clear errors in the python / extension host logs.
Tried setting the logs for trace / debug, but did not find any error, or anything useful.
If I set:
"python.experiments.optOutFrom": ["pythonTestAdapter"]
The test discovery works, but the discovery fails over other issues, which normally never failed for me.
If I do not click on the "test explorer" icon, but simple save a python test file, the discovery for the project works, as I can see the green arrow for run / debug tests for the tests files in the project.
It started a few days ago, so I suspect this is related to one of the latest updated of the python extension.
Steps to reproduce:
- Click on the "test explorer" UI icon.
- pytest discovery never ends
Diagnostic data
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
XXX
Extension version: 2024.22.0
VS Code version: Code 1.96.0 (138f619c86f1199955d53b4166bef66ef252935c, 2024-12-11T02:29:09.626Z)
OS version: Darwin arm64 24.2.0
Modes:
- Python version (& distribution if applicable, e.g. Anaconda): 3.10.11
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
- Value of the
python.languageServersetting: Pylance
User Settings
Multiroot scenario, following user settings may not apply:
envFile: "<placeholder>"
languageServer: "Pylance"
testing
• pytestArgs: "<placeholder>"
• pytestEnabled: true
• unittestArgs: "<placeholder>"
Installed Extensions
| Extension Name | Extension Id | Version |
|---|---|---|
| autopep8 | ms-python.autopep8 | 2024.0.0 |
| Code Spell Checker | streetsidesoftware.code-spell-checker | 4.0.21 |
| Codeium: AI Coding Autocomplete and Chat for Python, Javascript, Typescript, Java, Go, and more | Codeium.codeium | 1.30.2 |
| Copy File Name | ouweiya.copy-file-name | 3.0.9 |
| custom-button | OhYee.custom-button | 1.0.0 |
| Django | batisteo.vscode-django | 1.15.0 |
| Draw.io Integration | hediet.vscode-drawio | 1.6.6 |
| ESLint | dbaeumer.vscode-eslint | 3.0.10 |
| Flow / Jira Commit Prefix | emilianox.flow-jira-commit-prefix | 0.0.9 |
| Git Blame | waderyan.gitblame | 11.1.1 |
| Git History | donjayamanne.githistory | 0.6.20 |
| GitHub Actions | github.vscode-github-actions | 0.27.0 |
| GitHub Pull Requests | GitHub.vscode-pull-request-github | 0.102.0 |
| GitLens — Git supercharged | eamodio.gitlens | 16.0.5 |
| HashiCorp Terraform | hashicorp.terraform | 2.34.1 |
| IntelliCode | VisualStudioExptTeam.vscodeintellicode | 1.3.2 |
| IntelliCode API Usage Examples | VisualStudioExptTeam.intellicode-api-usage-examples | 0.2.9 |
| isort | ms-python.isort | 2023.10.1 |
| JavaScript and TypeScript Nightly | ms-vscode.vscode-typescript-next | 5.8.20241216 |
| JavaScript Debugger | ms-vscode.js-debug | 1.96.0 |
| JavaScript Debugger Companion Extension | ms-vscode.js-debug-companion | 1.1.3 |
| Jupyter | ms-toolsai.jupyter | 2024.11.0 |
| Jupyter Cell Tags | ms-toolsai.vscode-jupyter-cell-tags | 0.1.9 |
| Jupyter Keymap | ms-toolsai.jupyter-keymap | 1.1.2 |
| Jupyter Notebook Renderers | ms-toolsai.jupyter-renderers | 1.0.21 |
| Jupyter Slide Show | ms-toolsai.vscode-jupyter-slideshow | 0.1.6 |
| Markdown All in One | yzhang.markdown-all-in-one | 3.6.2 |
| Open full realpath | ima-miz-vscode.open-full-realpath | 0.1.1 |
| Open In Default Browser | peakchen90.open-html-in-browser | 2.1.10 |
| Path Intellisense | christian-kohler.path-intellisense | 2.10.0 |
| Peacock | johnpapa.vscode-peacock | 4.2.2 |
| Postman | Postman.postman-for-vscode | 1.5.1 |
| Prettier SQL VSCode | inferrinizzard.prettier-sql-vscode | 1.6.0 |
| Pylance | ms-python.vscode-pylance | 2024.12.1 |
| Pytest IntelliSense | Cameron.vscode-pytest | 0.1.1 |
| Python | ms-python.python | 2024.22.0 |
| Python Debugger | ms-python.debugpy | 2024.14.0 |
| Python Extension Pack | donjayamanne.python-extension-pack | 1.7.0 |
| Python Indent | KevinRose.vsc-python-indent | 1.18.0 |
| Spell Right | ban.spellright | 3.0.140 |
| Table Visualizer for JavaScript Profiles | ms-vscode.vscode-js-profile-table | 1.0.10 |
| Terraform Advanced Syntax Highlighting | pjmiravalle.terraform-advanced-syntax-highlighting | 1.4.3 |
| Terraform Completer | mgtrrz.terraform-completer | 0.2.0 |
| Test Adapter Converter | ms-vscode.test-adapter-converter | 0.2.1 |
| Test Explorer UI | hbenl.vscode-test-explorer | 2.22.1 |
| undefined | oderwat.indent-rainbow | 8.3.1 |
| vscode-icons | vscode-icons-team.vscode-icons | 12.10.0 |
| YAML | redhat.vscode-yaml | 1.15.0 |
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (8 x 2400) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 3, 4, 5 |
| Memory (System) | 32.00GB (0.28GB free) |
| Process Argv | --crash-reporter-id cf2645eb-101b-464d-b242-c8081c97eeb2 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
pythonvspyt551cf:31179979
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc2:31192216
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624
Activity
Imanuel-Miz commentedon Dec 17, 2024
Just for test, I downgraded to 2024.20.0 version, and can see the discovery working.
So, it seems to be an issue with the version: 2024.22.0
eleanorjboyd commentedon Dec 17, 2024
duplicate of: #24613. Should be resolved on the newest version of vscode-python insiders!
Imanuel-Miz commentedon Dec 18, 2024
Thank you Eleanor Boyd (@eleanorjboyd) , for your fast response on this bug.
I switched to the pre-release version, and indeed the discovery started to kick in.
However, it seems like it is not completely solved, as now my discovery only "half" working.
The discovery starts to some of my folders, it does not show that it stopped, and I cannot see the names of the folders in the test explorer:

I am using multi-workspace configuration, and normally, I would see all the repositories in my folders, as a list in the test explorer as well:

I didn't see any special log in the python extension / extension host logs.
Would appreciate your assistance on the matter.
thank you!
eleanorjboyd commentedon Jan 6, 2025
Hi! Sorry for the delay- #24656 should have more info and be up to date- thanks
Imanuel-Miz commentedon Jan 7, 2025
Hi Eleanor Boyd (@eleanorjboyd) , hope you enjoyed your vacation during the holidays!
Indeed, I noticed that the main ticket: #24656
Confirmed it is solved for me as well, in the pre-release version.
Appreciate your help, and thank you for maintaining and improving the python test feature!!
hhalaby commentedon Feb 10, 2026
Anyone landing here from google, there's seems to be a new issue with systemd services failing and causing this error again. Here's the solution on StackOverFlow