Bug 12229 - Debugger shows incorrect values of variables if a default value is defined
Summary: Debugger shows incorrect values of variables if a default value is defined
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 4.0.5
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 4.0.9 (from master)
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2013-05-14 05:09 UTC by René Ruppert
Modified: 2013-06-24 16:18 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description René Ruppert 2013-05-14 05:09:41 UTC
Have a method with a default value and call it:

void foo(int val = -1)
// Prints 666!

// Pass 666, don't use the default value

If you put a breakpoint inside foo() and hover "val" with the mouse, the tooltip will show that the value of "val" is "-1". This is wrong. The value is 666.
The debugger watch shows the correct value.

See this screencast for a demo: http://screencast.com/t/AZOQRepoBZ7k

=== Xamarin Studio ===

Version 4.0.5 (build 4)
Installation UUID: 9f43c339-0c16-4395-b7fe-92bd8f0c32b4
	Mono 2.10.12 (mono-2-10/c9b270d)
	GTK 2.24.16
	GTK# (
	Package version: 210120000

=== Apple Developer Tools ===

Xcode 4.6.2 (2067.2)
Build 4H1003

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Not Installed

=== Xamarin.iOS ===

Version: (Enterprise Edition)
Hash: c4f6316
Build date: 2013-22-04 18:55:23-0400

=== Build Information ===

Release ID: 400050004
Git revision: 5c86fd4af12c978b71fe8c62ff0f8846c6ab1ca8
Build date: 2013-05-03 19:25:06+0000
Xamarin addins: 603116b3659f75acbed00d7786768d2578832599

=== Operating System ===

Mac OS X 10.8.3
Darwin iMacRR 12.3.0 Darwin Kernel Version 12.3.0
    Sun Jan  6 22:37:10 PST 2013
    root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64
Comment 1 Jeffrey Stedfast 2013-05-14 13:29:44 UTC
this is now fixed in git master
Comment 2 PJ 2013-06-24 16:18:40 UTC
This bug was marked as fixed for Xamarin Studio 4.0.9, which is currently in the beta channel. Try it out!