Skip to content

Debugging child processes #317

@gilescope

Description

@gilescope

When running integration tests on a rust exe, the tests will invoke separate processes to start the executable. This is good because it's testing the external interface, but it really sucks for debugging.

E.g.: https://github.com/ChrisGreenaway/cargo-local-registry/blob/master/tests/all.rs

(As far as I know this approch is the 'right' way to code integration tests for a command line app in rust)

Is there a way that we can launch a child process from a debugged rust process and somehow flag to the debugger that we'd really really like you to debug that also?

(I guess the follow up question is could we then hide that implementation in a crate so that it could support a range of debuggers.)

I don't think we should change how rust does the integration testing because there are many other times where I've created a subprocess that I'd ideally like to be included in the debugging session by default.

If we could find a nice mechanism for this it would be a real step forward for debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions