8

Hi I have the following state:

The cargo rust project: /Users/daniel1302/www/aws-alarm/ The workspace dir: `/Users/daniel1302/www

I have the following debugging configuration:

{
            "type": "lldb",
            "request": "launch",
            "name": "rust/aws-alarm",
            "cwd": "/Users/daniel1302/www/aws-alarm/",
            "cargo": {
                "args": [
                    "build",
                    "--lib"
                ],
            },
            "program": "${cargo:program}",
            "args": [],
            "env": {
                "AWS_PROFILE": "sf_MFA",
                "AWS_REGION": "us-east-1"
            },
        }

When I am starting the project debugging I can see:

Running `cargo build --lib --message-format=json`...
error: could not find `Cargo.toml` in `/Users/daniel1302/www/releases` or any parent directory

The issue is, that cwd directive does not change the project directory.

Do you know How can I change the cargo project directory?

1 Answer 1

10

I have found workaround by setting cargo arg --manifest-path:

"configurations": [
{
...
    "cargo": {
        "args": [
           "build",
           "--bin=importer",
           "--package=cprices",
           "--manifest-path=${workspaceFolder}/cprices/Cargo.toml"
        ],
...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.