Skip to content

pass cargo extra args when debugging #17495

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

Merged

Conversation

listochkin
Copy link
Member

fixes #17128

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 25, 2024
@Veykril
Copy link
Member

Veykril commented Jul 1, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jul 1, 2024

📌 Commit cb523fc has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Jul 1, 2024

⌛ Testing commit cb523fc with merge e6fd485...

@bors
Copy link
Contributor

bors commented Jul 1, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing e6fd485 to master...

@bors bors merged commit e6fd485 into rust-lang:master Jul 1, 2024
11 checks passed
@bittailor
Copy link

bittailor commented Jul 6, 2024

Hi

When I currently use the prerelease rust-analyzer VsCode extension (v0.4.2025) I'm not able anymore to debug indivitual tests via the 'debug link' above the test.

image

it fails with

    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.00s
     Running unittests src/lib.rs (target/debug/deps/vs_debug_issue-c35e030d2028369f)
error: Unrecognized option: 'message-format'
error: test failed, to rerun pass `-p vs-debug-issue --lib`

With the release version (v0.3.2020) it still works.

I think I tracked it down to the change in this PR as it adds -- into the arguments list that is passed to the find the test artifact while later (in toolchian.ts --message-format=json is added to the end of the arguments list.

So currently on master the argument list looks like the following which has the --message-format=json after the -- and in my view causes the issue as it is now passed to the test executable instead of to cargo:
image

while running the release tag v0.3.2020 the argument list looks like

image

@Shelim
Copy link

Shelim commented Jul 6, 2024

Confirming, the issue is happening in the wild and there are very few hits on Google yet.

To clarify (TL;DR): the current workaround is to downgrade rust-analyser in VsCode to Release version via extension menu

bors added a commit that referenced this pull request Jul 6, 2024
fix: Fix passing `message-format` after -- in debugging

Fixes #17495 (comment)
bors added a commit that referenced this pull request Jul 6, 2024
fix: Fix passing `message-format` after -- in debugging

Fixes #17495 (comment)
lnicola pushed a commit to lnicola/rust that referenced this pull request Jul 11, 2024
fix: Fix passing `message-format` after -- in debugging

Fixes rust-lang/rust-analyzer#17495 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VSCode: Debug run does not respect rust-analyzer.runnables.extraArgs
6 participants