Skip to content

Odd mismatched file error when debugging #14

@PathogenDavid

Description

@PathogenDavid

Hello!

I've discovered an odd issue where I get an error stating my main.rs doesn't match what the app was built with even though it does. (Actually it specifically states main.rs doesn't match what main.rs was built with, which is kinda weird.)

After dismissing the dialog, debugging works as expected. The issue doesn't happen with Hello World but it does happen with the short snippet included below.

To reproduce:

  1. Populate main.rs as follows:
fn main() {
    let args: Vec<String> = std::env::args().collect();
    dbg!(&args);
}
  1. Place a breakpoint on either line.
  2. Launch the app with debugging
  3. Receive this warning dialog:

image

  1. Dismiss the dialog, debugging will still work as expected

I can reproduce this with Visual Studio 2022 (17.5.2 -- latest stable) and Rust/Cargo 1.68.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions