Skip to content

Step Over/Into/Out does not stop in sub-process for Python 3.12 #756

@KindRoach

Description

@KindRoach

Reproduce

Platform: Linux

Debug below script with python 3.12:

from multiprocessing import Process, current_process


def subprocess_task():
    print(f"[Subprocess] Name: {current_process().name}")
    print(f"[Subprocess] Name: {current_process().name}") # breakpoint here 
    print(f"[Subprocess] Name: {current_process().name}") # step over does not stop here
    print(f"[Subprocess] Name: {current_process().name}")


if __name__ == "__main__":
    print(f"[Main Process] Name: {current_process().name}")
    print(f"[Main Process] Name: {current_process().name}") # breakpoint here
    print(f"[Main Process] Name: {current_process().name}") # step over stop here
    print(f"[Main Process] Name: {current_process().name}")

    p = Process(target=subprocess_task, name="MySubprocess")
    p.start()
    p.join()

For Python 3.11 or 3.10, everything works fine.

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from postertriage-neededNeeds assignment to the proper sub-team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions