rust-analyzer.vs icon indicating copy to clipboard operation
rust-analyzer.vs copied to clipboard

error message: "Sequence contains no elements"

Open demon740 opened this issue 8 months ago • 4 comments

I am using VS2022 and I get this error (in message box) when I try to run it: "Sequence contains no elements" (see screen shot)

Image

demon740 avatar Apr 08 '25 09:04 demon740

I see the same.

SergeVDev avatar May 10 '25 13:05 SergeVDev

Same problem, found a solution yet?

Emil215p avatar May 20 '25 10:05 Emil215p

Same problem, found a solution yet?

Nope. Waiting for the author @kitamstudios. Frankly, for me building / formatting is enough right now.

SergeVDev avatar May 20 '25 12:05 SergeVDev

extension author as well as one of extns heaviest user here.

assuming it's the latest version, as mentioned in the readme - one of you'll need to send a PR - isn't difficult: fork sources do f5 from VS & debug.

or if it is time critical pay me to fix it. or i fix it when i encounter it.

so far just 1 minor pr from the community. this is one helluva entitled group of ppl that doesn't believe in giving back.

parthopdas avatar May 20 '25 12:05 parthopdas

This is caused by a change to rustup seen here: https://github.com/rust-lang/rustup/pull/4270 They updated rustup show --verbose to enumerate a third line per toolchain which breaks rust-analyzer.VS with any rustup install 1.28.2 or newer. The fix is therefore pretty simple, we just need to parse 3 lines at a time instead of 2. I've sent a PR fixing this with #62 .

zhuman avatar May 27 '25 21:05 zhuman

fix deployed to marketplace

unrenormalizable avatar Jun 11 '25 06:06 unrenormalizable

The error message is gone, so I finally can run the program with F5.

But it seems like breakpoints aren't working. Is it by design?

SergeVDev avatar Jun 11 '25 06:06 SergeVDev

verified breakpoints before release. maybe delete your .vs folder and other vs cache files.

unrenormalizable avatar Jun 11 '25 06:06 unrenormalizable

Cleaning / rebuilding fixed the problem.

SergeVDev avatar Jun 11 '25 06:06 SergeVDev