Bug 12509 - step over causes the debugger to continue execution
Summary: step over causes the debugger to continue execution
Alias: None
Product: Runtime
Classification: Mono
Component: Debugger ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
Depends on:
Reported: 2013-06-01 17:00 UTC by paul
Modified: 2013-06-02 00:39 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 GitHub or Developer Community 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 paul 2013-06-01 17:00:43 UTC
The step over command is failing for me in the following situation, which I have been able to reproduce this on two different Macs.  

I start with an empty IPhone application and modify the appDelegate.cs file to the code below.  Next place a breakpoint on line 63 which is (UIView v1 = new UIView(new Rectangle(113, 111, 132, 194));).  Set the debugger to use the iPhone Simulator.  I have tried both the iPhone simulator 6.0 and 6.1 and both have the issue.  Start the debugger.  Once the breakpoint is reached press the step over button 3 times.  The third time the debugger does not step to the next line (line 67), but instead continues the execution of the application.  You can place a breakpoint on lines 69 or 70 to confirm that the debugger has continued and not exited as it will break on that breakpoint.

Another oddity to this bug is that if you place the original breakpoint one line down on line 64 you can only run the step over command 3 times before it continues the application.

using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System.Drawing;

namespace Chap14
	// The UIApplicationDelegate for the application. This class is responsible for launching the 
	// User Interface of the application, as well as listening (and optionally responding) to 
	// application events from iOS.
    [Register ("AppDelegate")]
	public partial class AppDelegate : UIApplicationDelegate
		// class-level declarations
        UIWindow window;
		// This method is invoked when the application has loaded and is ready to run. In this 
		// method you should instantiate the window, load the UI into it and then make the window
		// visible.
		// You have 17 seconds to return from this method, or iOS will terminate your application.
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
            // create a new window instance based on the screen size
            window = new UIWindow(UIScreen.MainScreen.Bounds);
            // If you have defined a root view controller, set it here:
            window.RootViewController = new UIViewController();

            // make the window visible
            return true;

        private void Overlap()
            UIView v0 = new UIView(window.Frame);
            v0.BackgroundColor = UIColor.Blue;

            UIView v1 = new UIView(new Rectangle(113, 111, 132, 194));
            v1.BackgroundColor = UIColor.FromRGBA(1f, .4f, 1f, 1f);
            UIView v2 = new UIView(new Rectangle(41, 56, 132, 194)) ;
            v2.BackgroundColor = UIColor.FromRGBA(.5f, 1f, 0f, 1f);
            UIView v3 = new UIView(new Rectangle(43, 197, 160, 230)) ;
            v3.BackgroundColor = UIColor.FromRGBA(1f, 0f, 0f, 1f);



        private void Bounds()
            UIView v1 = new UIView(new Rectangle(113, 111, 132, 194));
            v1.BackgroundColor = UIColor.FromRGBA(1f, .4f, 1f, 1f);

            UIView v2 = new UIView(RectangleF.Inflate(v1.Bounds, -10, -10));
            v2.BackgroundColor = UIColor.FromRGBA(.5f, 1f, 0f, 1f);

Comment 1 Zoltan Varga 2013-06-02 00:39:09 UTC
Fixed in master(4bb1ab7decf885e1b22112a5688b01e0caaff7ce) and mobile-master(327657c6a863e9bd0418c846e406443e3472dc42). Thanks for the testcase.