Skip to content

getDebugConfiguration doesn't handle runner override #19882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
diorcety opened this issue May 28, 2025 · 4 comments
Open

getDebugConfiguration doesn't handle runner override #19882

diorcety opened this issue May 28, 2025 · 4 comments
Labels
C-bug Category: bug

Comments

@diorcety
Copy link

On VSCode, when running a test using lens snipper, the test is run using cargo test.
The debug use "cargo test --message-format=json --no-run ..." in order to get executable information in order to construct debugger args.

If in .cargo/config.toml the runner is overridden the run is working well unlike the debug.
Indeed "cargo test --message-format=json --no-run ..." doesn't give any information about the runner.

A way to have the runner is to parse the line containing Executable on stderr when using "cargo test -v --no-run"

@diorcety diorcety added the C-bug Category: bug label May 28, 2025
@Veykril
Copy link
Member

Veykril commented May 28, 2025

If in .cargo/config.toml the runner is overridden the run is working well unlike the debug.

What is the runner here? Can you give an example config.toml?

@diorcety
Copy link
Author

Sure:

An example using embedded-test on x86:

[target."x86_64-unknown-linux-gnu"]
runner = "embedded-test-std-runner"

@Veykril
Copy link
Member

Veykril commented May 28, 2025

Ah okay, so I assume the extension might be running things in a different directory which makes cargo not pick up the related config

@diorcety
Copy link
Author

No because if I run the test the runner is used (with cargo test called by the extension). But in the case of debug cargo test is only used to get infomation, in which, the runner information is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants