Skip to content
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

Default working directory does not match expectations #13

Open
PathogenDavid opened this issue Mar 16, 2023 · 1 comment
Open

Default working directory does not match expectations #13

PathogenDavid opened this issue Mar 16, 2023 · 1 comment

Comments

@PathogenDavid
Copy link

Hello!

When launching a Rust app with this extension, it sets the working directory to the target output path. IE: Launching the project minigrep will launch ...\minigrep\target\debug\minigrep.exe with ...\minigrep\target\debug\ as the working directory.

While I actually personally prefer what your extension is doing, this runs contrary to what I've grown to expect from other Rust tools.

The Rust Book typically has you running cargo run in the context of the same folder as Cargo.toml. Which means the working directory will be that folder. (...\minigrep\ in the example above.)

By default the rust-analyzer extension for VSCode as well as CLion with the JetBrains Rust extension follow this behavior as well -- launching from ...\minigrep\.

Ideally the working directory could be customized as well. I saw #10 but it seems you can't change the working directory with launch.vs.json.

@ericsink
Copy link
Contributor

Hmmm. I'm pretty sure that has annoyed me too. I think it's just the default Visual Studio is giving us, but I'm also pretty sure we can change it. We'll investigate. Thanks.

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

No branches or pull requests

2 participants