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

Function args show up twice in VS debugger's Locals view #37634

Closed
vvuk opened this issue Nov 7, 2016 · 4 comments
Closed

Function args show up twice in VS debugger's Locals view #37634

vvuk opened this issue Nov 7, 2016 · 4 comments
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. O-windows-msvc Toolchain: MSVC, Operating system: Windows

Comments

@vvuk
Copy link
Contributor

vvuk commented Nov 7, 2016

Any function args show up twice in the VS debugger's Locals view. Local variables show up only once.

@sfackler sfackler added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Nov 7, 2016
@sanxiyn sanxiyn added the O-windows-msvc Toolchain: MSVC, Operating system: Windows label Nov 8, 2016
@Mark-Simulacrum
Copy link
Member

Could someone with access to Visual Studio and an MSVC environment take a look at this today?

@Mark-Simulacrum Mark-Simulacrum changed the title function args show up twice in VS debugger's Locals view [msvc] Function args show up twice in VS debugger's Locals view May 16, 2017
@vvuk
Copy link
Contributor Author

vvuk commented May 16, 2017 via email

@Mark-Simulacrum
Copy link
Member

Not that I know of, but it never hurts to check. I wasn't actually quite aware I had strayed into November of 2016 already with issue triage, which is actually a good thing in some ways -- it means we've updated most of our ~2800 issues in the last 7 months.

@Mark-Simulacrum Mark-Simulacrum added the C-bug Category: This is a bug. label Jul 26, 2017
@wesleywiser
Copy link
Member

I just tested a basic scenario in both VS 2019 and Windbg. I was able to see function arguments in the Locals view correctly (each argument only showed once with the correct name, type and value).

Test code
fn add_two_numbers(x: usize, y: usize) -> usize {
  x + y
}

struct Options {
  add_numbers: bool,
  left: usize,
  right: usize,
}

fn do_it(options: Options) -> usize {
  if options.add_numbers {
    add_two_numbers(options.left, options.right)
  } else {
    options.left - options.right
  }
}

fn main() {
    let result = do_it(Options { add_numbers: true, left: 10, right: 3 });
    let result_2 = do_it(Options { add_numbers: false, left: 9, right: 5 });

    println!("result = {}, result_2 = {}", result, result_2);
}

Since this is working and this issue is rather old, I'm going to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. O-windows-msvc Toolchain: MSVC, Operating system: Windows
Projects
None yet
Development

No branches or pull requests

5 participants