Skip to content

memory leak after running Python tests #25641

Description

@iclite

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.106.3 (user setup)
  • OS Version: Windows_NT x64 10.0.26100

Steps to Reproduce:

  1. 点击 Test -> 运行某个 test (python, pytest)
  2. window 的内存占用持续增加, 我的测试很长,可能会持续几天,最后内存不足 vscode 无响应
  3. 在主动点击结束测试,window 内存占用依然较高。
Image

Activity

  1. vs-code-engineering commented on Dec 2, 2025

    @vs-code-engineering

    AI Translation:

    Title:

    When using the testing feature, window memory usage keeps increasing

    Body:

    Does this issue occur when all extensions are disabled?: Yes/No

    • VS Code Version: 1.106.3 (user setup)
    • OS Version: Windows_NT x64 10.0.26100

    Steps to Reproduce:

    1. Click Test -> Run a test (python, pytest)
    2. The window's memory usage keeps increasing. My tests are very long and may run for several days. Eventually, memory runs out and VS Code becomes unresponsive.
    3. Even after manually clicking to end the test, window memory usage remains high.
    Image
  2. anthonykim1 commented on Dec 10, 2025

    @anthonykim1

    I think the user is stating there may be memory leak after running Python tests

  3. changed the title [-]使用测试功能时window占用内存会持续增加[/-] [+] memory leak after running Python tests[/+] on Dec 18, 2025
  4. eleanorjboyd commented on Sep 23, 2026

    @eleanorjboyd
    Member

    🤖 Thanks for the report. Could you confirm whether this still occurs on the latest VS Code and Python extension releases, and provide the Python extension, Python, and pytest versions; a minimal long-running test; whether the test produces continuous stdout/stderr; and the Python: Report Issue output? Please also identify which process grows in Developer: Open Process Explorer and, if possible, compare memory growth with pytest output suppressed. Issues marked info-needed automatically close after 30 days without a reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-testingbugIssue identified by VS Code Team member as probable bugconfirmation pendingThe issue needs to be confirmed through a maintainer reproducing the bug.info-neededIssue requires more information from poster

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions