Skip to content

meta: Allow cargo's tests to be run in-process for debugging #9757

Closed
@gilescope

Description

@gilescope

Almost all the cargo tests test cargo as an external process which is great from a purity standpoint.

Unfortunatly llvm doesn't support debugging child processes ( vadimcn/codelldb#317 ), so it's not possible to use an llvm debugger to debug into cargo from a failing test.

It would be really helpful if in cargo-test-support rather than starting a new process there was a flag (maybe an env var set?) to tell it to call the main function directly from the test instead of routing it through a new process. I'm sure all tests won't magically run clean that way, but if the majority do that would be very helpful. I'm sure it's not quite that easy, but being able to debug into cargo from most failing tests would likely reduce the bar to contributing to cargo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testing-cargo-itselfArea: cargo's testsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions