Bug 31715 - Linq predicates that use string.Contain or string.IndexOf disrupt debugging breakpoints
Summary: Linq predicates that use string.Contain or string.IndexOf disrupt debugging b...
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 5.1
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-07-07 13:54 UTC by John Miller [MSFT]
Modified: 2015-07-08 08:52 UTC (History)
2 users (show)

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


Attachments
Test Case (58.78 KB, application/zip)
2015-07-07 13:54 UTC, John Miller [MSFT]
Details


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 31715 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 John Miller [MSFT] 2015-07-07 13:54:30 UTC
Created attachment 11913 [details]
Test Case

**Overview:**

   The attached sample reproduces an issue when the LINQ method Where() has a predicate that uses the string.Contains causes the debugger to break on an incorrect line. 

**Steps to Reproduce:**

   1. Run the attached sample on an Android simulator
   2. Press the only button on the screen
   3. The debugger will break on Line 31 of Login.cs because of the Debugger.Break() statement. This is expected.
   4. Now stop the app. 
   5. Open the Caching/FooClass.cs file and uncomment the only method in there "GetFilesMatchingFilter"
   6. Repeat steps 1-2 with the method uncommented

**Actual Results:**

   The debugger breaks on an incorrect line in the PBEApp.cs file. 

**Expected Results:**

   The debugger should still break on line 31 of Login.cs

**Build Date & Platform:**

   === Xamarin Studio ===

Version 5.9.4 (build 5)
Installation UUID: e01c3049-a2d2-4e0a-aad8-afe6fb627c4d
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

=== Xamarin.Android ===

Version: 5.1.4.16 (Business Edition)
Android SDK: /Users/johnmiller/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 6.3 (7569)
Build 6D570

=== Xamarin.iOS ===

Version: 8.10.3.2 (Business Edition)
Hash: 8b265d6
Branch: master
Build date: 2015-06-30 15:19:13-0400

=== Xamarin.Mac ===

Version: 2.0.2.35 (Business Edition)

=== Build Information ===

Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

=== Operating System ===

Mac OS X 10.10.2

**Additional Information:**

   Move the entire FooClass code inside the same file as Login.cs, (and add the appropriate using statements) – and debugging works properly again
   Simply make them part of the same namespace, however, and it still does not work.
Comment 2 Parmendra Kumar 2015-07-07 14:36:47 UTC
I have checked this issue with attached sample project and I am able to reproduce this issue. To reproduce this issue I have followed steps mentioned in bug description.

Screencast: http://www.screencast.com/t/eOe0j0o5AEd

ApplicationOutput Log: https://gist.github.com/Parmendrak/7f2874396fc087b28dc0
IDE Log: https://gist.githubusercontent.com/Parmendrak/afcd4190ae099bb4de07/raw/IDELog

Environment info:

=== Xamarin Studio ===

Version 5.9.4 (build 5)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Runtime:
	Mono 4.0.2 ((detached/c99aa0c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400020005

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.Mac ===

Version: 2.0.2.43 (Enterprise Edition)

=== Xamarin.iOS ===

Version: 8.10.2.43 (Enterprise Edition)
Hash: 428e4d4
Branch: master
Build date: 2015-07-03 10:41:01-0400

=== Xamarin.Android ===

Version: 5.1.4.16 (Enterprise Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
Java SDK: /usr
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Build Information ===

Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8

=== Operating System ===

Mac OS X 10.9.4
Darwin ShrutiMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64