0

Full disclosure: complete newbie to rust and vscode here and maybe I am asking the obvious.

Problem: I have a Rust application that runs properly with vscode if I use the "run" option above the main function, but when I try to use Ctrl-Alt-N with vscoderunner extension the console will see a ton of complaints about missing cargo crates. Example: enter image description here

The way I solved it is to change the command in vscode settings file from rustc to cargo run but this feels like something that should be native. Also fiddling with the default settings file really leaves a bad taste in my mouth and I think I am missing something obvious... am I?

E_net4
  • 27,810
  • 13
  • 101
  • 139
Zeks
  • 2,265
  • 20
  • 32
  • It should probably just be `cargo run`. – PitaJ Sep 13 '22 at 16:21
  • Which extension do you speak of? [This one](https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner)? – E_net4 Sep 13 '22 at 16:23
  • I installed this one: https://marketplace.visualstudio.com/items?itemName=HarryHopkinson.vs-code-runner maybe it was a bad choice and I should use the one you linked? – Zeks Sep 13 '22 at 16:25
  • actually no. I tested with a clean installation and the extension you linked produces the same results. seems like runner settings file is global to vscode and I still wonder if editing it was a good idea – Zeks Sep 13 '22 at 16:36
  • 1
    I think all the information you could ever want is in the duplicate :) – Finomnis Sep 13 '22 at 18:21
  • Yes, you are right, thank you. It appears what I did is one of the possible listed solutions – Zeks Sep 13 '22 at 21:41

0 Answers0