Bug 35632 - [Visual Studio 2015] Exception Settings are not reflective of current settings
Summary: [Visual Studio 2015] Exception Settings are not reflective of current settings
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Debugger ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: --- normal
Target Milestone: 4.2.0 (C8)
Assignee: Joaquin Jares
URL:
: 38593 ()
Depends on:
Blocks: 38593
  Show dependency tree
 
Reported: 2015-11-06 12:43 UTC by Jon Douglas [MSFT]
Modified: 2016-06-28 01:53 UTC (History)
16 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 on 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:
Status:
VERIFIED FIXED

Description Jon Douglas [MSFT] 2015-11-06 12:43:01 UTC
*Description:

By default, managed exceptions are ignored with the respective "Reset the list to the default settings" in the Exception Settings Window found in Debug -> Windows -> Exception Settings (CTRL + ALT + E)

For example in the OnCreate of a new Android Application:

            try
            {
                throw new Exception();
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Failed");
            }

This of course would be caught as it is thrown. However the debugger will not break upon it unless it was specified in the CLR options. So here's the respective scenario:

1) I do not have the CLR -> System.Exception Checkmark Checked - http://screencast.com/t/Uw7WsDr5j

I would then skip straight over the exception and continue running as normally. There is no break in the debugger and I see the following message in the console:

11-06 12:22:46.236 I/mono-stdout(28641): Failed
[0:] Failed

2) I do have the CLR -> System.Exception Checkmark Checked - http://screencast.com/t/NgaErHETv

The debugger would then break with the following popup - http://screencast.com/t/tdrdrbD0DX

Now here's the interesting part that I discovered...I'm not sure if it's a bug in our tooling or a bug with the new VS 2015 Exception Settings Window.

If I then Uncheck the System.Exception and try it again, I am running into the same scenario as #2. Which makes me think that the setting is not getting saved/reflected properly. However if I "Reset the list to the default settings" - http://screencast.com/t/NEESbyuSn3XS it now works and we'ere back to the #1 scenario.

I have also attempted to restart VS to see if it was an issue inside the IDE, but it does not seem to directly reflect those changes unless "Reset the list to the default settings" is clicked.

*Expected Behavior: 

I should be able to correctly reflect my Exception Settings back and forth between the respective "Breaks" I would like to have. I should not have to "Reset the list to the default settings" to ignore managed exceptions.

*Replication Steps:

1. Create a File -> New Android Project
2. Add the following code snippet to the bottom of the OnCreate inside the MainActivity:

            try
            {
                throw new Exception();
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Failed");
            }

3. Open up the Exception Settings Window found in Debug -> Windows -> Exception Settings (CTRL + ALT + E)

4. Click "Reset the list to the default settings" to ensure we start fresh

5. Run the application and see the observation as listed in scenario #1

6. Check the CLR -> System.Exception Checkmark

7. Run the application and see the observation as listed in scenario #2

8. Uncheck the CLR -> System.Exception Checkmark

8. Run the application and see the observation again listed in scenario #2

9. Click "Reset the list to the default settings"

10. Run the application and see the observation listed in scenario #1

*Version Information:

Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00079

Installed Version: Professional

Xamarin   4.0.0.1649 (90e1af2)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.0.27 (9d7074e)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.2.1.21 (9ce9e8b)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Jon Douglas [MSFT] 2015-11-06 14:20:44 UTC
As an additional followup:

It seems that you can also just "Remove an exception from the list" to get the desired behavior, but it still seems that the respective Checkboxes do not work when going from an "Active" state to an "Unactive" state.
Comment 2 Daniel Hindrikes 2015-12-11 14:48:35 UTC
I have reported this to Microsoft and they have reported it to Xamarin and they said they worked on a solution. It was in May. https://connect.microsoft.com/VisualStudio/feedback/details/1175453/exceptions-settings-windows
Comment 3 Jatin 2016-01-15 10:34:06 UTC
I have checked this issue and I am able to reproduce this issue given by description and steps. I am getting the same behavior as per comment 0.

Here is the screencast regarding same: http://www.screencast.com/t/6IN7jqPUU

Hence, I am changing the status of this issue as confirmed.

Supplement Info:
IDE logs: https://gist.github.com/anonymous/8eb9ce65c3e50acff8cd

Environment Info: https://gist.github.com/anonymous/ca9177de2d0929e1c17d
Comment 4 Matthew Orlando 2016-02-24 00:38:00 UTC
*** Bug 38593 has been marked as a duplicate of this bug. ***
Comment 6 Bogdan Verbenets 2016-06-16 13:53:42 UTC
I am also still able to reproduce it on VS 14.025123.00 Update 2, Xamarin 4.0.4.4, Xamarin.Android 6.0.4.0.
Comment 7 Bogdan Verbenets 2016-06-16 14:23:23 UTC
Still reproducible on VS 14.025123.00 Update 2, Xamarin 4.1.0.530, Xamarin.Android 6.1.0.71.
Comment 8 Joaquin Jares 2016-06-21 18:34:25 UTC
Fixed in master, will be available in C8.