The x86 debugger prevents the control flow to use an exception handler created with a generic type - by Jerome Laban

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 386652 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 12/4/2008 9:04:40 PM
Access Restriction Public


The following C# code : 

        static void Main(string[] args)

        public static void TestMethod<TException>() 
             where TException : Exception
                throw new Exception();
            catch (TException e)
                Console.WriteLine("Generic block");

Behaves differently while running with or without the VS2008 SP1 x86 Debugger.

The x86 debugger seems to alter the control flow and make it "skip" the genericly typed exception handler, whereas the x64 debugger does run the code properly.

Running without the debugger produces the expected results.
Sign in to post a comment.
Posted by Microsoft on 4/11/2009 at 3:52 PM

This issue will be addressed in our next release.

Visual Studio Debugger Team
Posted by Microsoft on 12/8/2008 at 12:52 AM
Thanks for your feedback. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team