Skip to content

Using multiprocessing -> TypeError: Cannot read properties of null (reading 'testsuites') #1537

@MalteBecker

Description

@MalteBecker

Environment data

  • debugpy version: 1.8.1
  • OS and version: Win10 22H2
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.18, pytest 7.4.3
  • Using VS Code or Visual Studio: VSCode

Actual behavior

I get the Error TypeError: Cannot read properties of null (reading 'testsuites') when using the debug option in the test explorer and using the multiprocessing module. If I just execute the test, I don´t get the error.

Expected behavior

No error

Steps to reproduce:

  1. Use this script:
import time
from multiprocessing import Pool

VALUES = [1, 2, 3, 4]


def do_something(bla: int):
    time.sleep(bla)


def test_multi():
    with Pool() as pool:
        pool.map(do_something, VALUES)


def test_for():
    for val in VALUES:
        do_something(val)
  1. Configure pytest to find the tests.
  2. Debug the "multi" test with the test explorer
    => Get the error TypeError: Cannot read properties of null (reading 'testsuites') in the "TEST RESULTS" tab.

Metadata

Metadata

Assignees

No one assigned

    Labels

    externalThe issue is caused by external component interacting with debugpy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions