Bug 13399 - Step Over behavior inconsistent in code using await Task.Run ()
Summary: Step Over behavior inconsistent in code using await Task.Run ()
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2013-07-22 20:54 UTC by Timothy Risi
Modified: 2013-07-23 11:41 UTC (History)
3 users (show)

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


Attachments
Sample app (13.40 KB, application/x-zip-compressed)
2013-07-22 21:03 UTC, Timothy Risi
Details

Description Timothy Risi 2013-07-22 20:54:24 UTC
Case 1:

Steps to Reproduce:
1.  Set a breakpoint on line 42 of MainActivity.cs - 'await Task.Run (() => SomeLongRunningTask ());'
2.  Debug the program
3.  When the debugger breaks at the line, use Step Over

Expected Result: Debugger steps over to line 43.

Actual Result: Execution continues as if Continue Execution were used instead of Step Over (the Application Output shows the results of the Console.WriteLine calls all the way back up the chain to the completion of the delegate method called when the button is clicked).

Case 2:

Steps to reproduce:
1.  Set a breakpoint on line 34 of MainActivity.cs - 'string s = await Bar ();'
2.  Debug the program
3.  When the debugger breaks at the line, use Step Over

Expected Result: Debugger steps over to line 35

Actual Result: Sometimes works correctly, sometimes jumps direclty to the end of the Foo method (bracket at line 37)

Step over works correctly with .Wait () or .Result.

Windows 7

Xamarin Studio
Version 4.0.10 (build 5)
Installation UUID: cee4785e-de39-4c9a-b766-7774352f26b5
Runtime:
	Microsoft .NET 4.0.30319.17929
	GTK 2.24.13
	GTK# (2.12.0.0)

Xamarin.Android
Version: 4.8.0 (Business Edition)
Android SDK: C:\Users\Tim\AppData\Local\Android\android-sdk
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.2   (API level 17)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
java version "1.6.0_39"
Java(TM) SE Runtime Environment (build 1.6.0_39-b04)
Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode, sharing)
Comment 1 Timothy Risi 2013-07-22 21:03:46 UTC
Created attachment 4395 [details]
Sample app

Note You need to log in before you can comment on or make changes to this bug.