Bug 565 - Cannot debug any app which throws an exception on separate thread
Summary: Cannot debug any app which throws an exception on separate thread
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: Trunk
Hardware: PC Linux
: --- major
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2011-08-31 08:30 UTC by Marek Safar
Modified: 2011-08-31 09:17 UTC (History)
2 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 Marek Safar 2011-08-31 08:30:11 UTC
using System;
using System.Threading;

namespace Test
	public class TaskFactoryTests
		public static void Main ()
			AutoResetEvent a = new AutoResetEvent (false);

			ThreadPool.QueueUserWorkItem (l => {
				a.Set ();
				int.Parse (null);

			a.WaitOne ();
			Thread.Sleep (1000);
			Console.WriteLine ("a");	// Set  breakpoint here, it won't be hit
Comment 1 Mikayla Hutchinson [MSFT] 2011-08-31 09:11:07 UTC
I don't understand what the problem is here. If you throw an unhandled exception in a thread, that alway kills .NET/Mono processes. MD should show the exception, but you won't be able to continue on and hit that breakpoint.
Comment 2 Marek Safar 2011-08-31 09:17:12 UTC
Yeah, the test is not good enough, I'll try to come up with better one later