Bug 57038 - Debugger unable to display value of NSData using indexer
Summary: Debugger unable to display value of NSData using indexer
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: Debugger ()
Version: XI 10.10 (d15-2)
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-01 09:14 UTC by softlion
Modified: 2017-09-11 15:40 UTC (History)
3 users (show)

Tags:
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 for Bug 57038 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description softlion 2017-06-01 09:14:04 UTC
I have this code:

1 NSData data = data.FromArray(new byte[] { 0x60, 0x03, .... });
2 var test = data[0];

While debugging, breakpoint set on line 2, in 'immediate window' (VS2015 debugger) i entered data[0], data, and data.ToArray(). 
Results:

data[0]
Incorrect number or types of arguments
Parameter name: arguments


data
{<60030190 0000006f e575dc>}
    base: {Foundation.NSObject}
    Bytes: 0x17623c290
    ClassHandle: 0x1ac6cfb98
    Length: 11


data.ToArray()
{byte[11]}
    [0]: 0x60
    [1]: 0x03
    [2]: 0x01
    [3]: 0x90
    [4]: 0x00
    [5]: 0x00
    [6]: 0x00
    [7]: 0x6f
    [8]: 0xe5
    [9]: 0x75
    [10]: 0xdc


Expected result:

data[0]
0x60


This may be a more deeper bug, any idea ?
Comment 1 Manuel de la Peña [MSFT] 2017-06-05 09:21:14 UTC
Hello, can you provide the information about your development environment? Is that for VS on Windows?
Comment 2 Vincent Dondain [MSFT] 2017-07-10 16:32:07 UTC
We have not received the requested information. If you are still experiencing this issue please include your full build logs, crash reports (if any), test case (to reproduce) and all version information and re-open the bug report. Thanks!
Comment 3 softlion 2017-07-10 17:39:57 UTC
Yes this is VS for windows.
Comment 4 Vincent Dondain [MSFT] 2017-07-10 21:14:43 UTC
Please include your full build logs, crash reports (if any), test case (to reproduce) and all version information.

To get full build logs just set the log verbosity to diagnostic at the following locations:
- On Visual Studio for Mac: Preferences > Projects > Build
- On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run

On Visual Studio Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.

Easiest way to get exact version information:
- On Visual Studio for Mac: "Visual Studio" menu, "About Visual Studio" item, "Show Details" button.
- On Visual Studio for Windows: "Help menu", "About Microsoft Visual Studio" item.
Then copy/paste the version information (you can use the "Copy Information" button).
Comment 5 Adam Hartley [MSFT] 2017-07-26 10:22:17 UTC
Thanks so much for taking the time to submit this report! I can confirm using the latest Xamarin.iOS 10.12.0.14 I am able to reproduce this issue. Marking this report as CONFIRMED. 

Sample: https://www.dropbox.com/s/5bg5qpsml19szf7/sample.zip?dl=0

=== Visual Studio Enterprise 2017 for Mac (Preview) ===

Version 7.1 Preview (7.1 build 1281)
Installation UUID: 89b55ee4-a263-4f78-ab14-226703159cb0
Runtime:
	Mono 5.2.0.209 (2017-04/3d531ba) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000209

=== NuGet ===

Version: 4.3.0.2418

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
	1.1.1
	1.0.4
SDK: /usr/local/share/dotnet/sdk/1.0.3/Sdks
SDK Version: 1.0.3
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.5
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 8.3.3 (12175.1)
Build 8E3004b

=== Xamarin.iOS ===

Version: 10.12.0.14 (Visual Studio Enterprise)
Hash: bf350ba5
Branch: d15-3
Build date: 2017-07-05 11:08:04-0400

=== Xamarin.Android ===

Version: 7.4.0.15 (Visual Studio Enterprise)
Android SDK: /Users/adam/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.4 (API level 19)
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin.Mac ===

Version: 3.6.0.13 (Visual Studio Enterprise)

=== Xamarin Inspector ===

Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT

=== Build Information ===

Release ID: 701001281
Git revision: cc3abfe9b515ed0e209041e00d3ea239e8e33df9
Build date: 2017-07-10 21:15:50-04
Xamarin addins: 73710b74251e471826f2d9981d3a2bee6c4e78ad
Build lane: monodevelop-lion-d15-3

=== Operating System ===

Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:21:16 PDT 2017
    root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64