Skip to content

Re-attach debugger to parent process after child exits #125717

@nyurik

Description

@nyurik

When debugging a complex multi-process code like Rust compiler unit tests, the current settings set target.process.follow-fork-mode child|parent is too limiting because a compiler test does a tree-like traversal - forking a subprocess which may spawn another subprocess, waiting for the child to finish, and forking another process and waiting for that, etc. If the follow mode is child, it will stop debugging when the first child exits. If it is the parent, it will never go into any child processes.

Thus, it is currently impossible to add a breakpoint to the code and wait for it to be hit - because it might be in the second child process that runs.

Would it be possible for the debugger to re-attach to the parent process once the child exits?

See also

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions