Home Dashboard Directory Help
Search

Debugger.Launch() is now crashing my .NET application after upgrading to .NET 4.0 by markoueis


Status: 

Closed
 as Fixed Help for as Fixed


8
1
Sign in
to vote
Type: Bug
ID: 611486
Opened: 10/7/2010 10:23:43 AM
Access Restriction: Public
0
Workaround(s)
view
7
User(s) can reproduce this bug

Description

For debugging environments, we have a conditional Debugger.Launch statement in the code to allow developers to debug into the startup code of the windows service. We just upgraded to .NET 4.0. Since the upgrade, if we exit out of the JIT window (i.e. we chose not to debug), the Windows Service crashes (process is terminating). It used to simply resume. If we accept to attach, the application does not terminate and works fine.

Another strange thing is that the exception that is thrown is no longer a Launch for User exception. It is now an unhandled Microsoft .NET framework exception. I've tried to wrap a try catch arround it to see what i get. I can't catch the exception when i'm debugged in because at that point the exception doesn't occur. If i try to log the exception to a file, the Service crashes and i get nothing.

This is apparently pretty easy to reproduce. It has occured on multiple systems in house and I've received confirmation from an external party that the problem can be reproduced simply by using the code snippet above in a .NET windows form that uses .NET 4.0
Details
Sign in to post a comment.
Posted by Microsoft on 5/25/2012 at 12:35 PM
Thank you for submitting this report. While, unfortunately, this issue did not meet the bar for Visual Studio 2010 SP1, we are glad to report that the fix has been included in Visual Studio 11, and has already shipped with the Developer Preview.
Posted by JeffN825 on 10/18/2011 at 12:38 PM
Shameful Microsoft, simply shameful.
Posted by markoueis on 3/9/2011 at 10:08 AM
Did this make Visual Studio 2010 SP1? If not, do we have an idea when microsoft plans on fixing it. Is there a hotfix for this yet?

Thanks
Posted by Microsoft on 10/15/2010 at 10:15 AM
Hi,

We have been able to repro the issue. We will continue our investigation to see how best to fix it and then make it available.

For a workaround instead of calling Debugger.Launch() you could call something like MessageBox.Show("Attach a debugger now if you want to") similar to what repro does. When the message box pops up you can manually attach to the process using Tools -> Attach to Process OR continue the process by clicking on OK button. I realize this is not as convenient.

Hope that helps.

Azeem Khan
VS Debugger.
Posted by Microsoft on 10/10/2010 at 11:46 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Posted by markoueis on 10/8/2010 at 7:33 AM
I've also attached the VS 2010 solution that causes this problem. It's attached to this case
Posted by markoueis on 10/8/2010 at 7:31 AM
I have posted a dump file created using procdump.exe.
Posted by Microsoft on 10/7/2010 at 6:50 PM

Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.
    
It may help if you provide us with a dump file and call stack.

You can get detailed steps about how to get the dump file and call stack at http://blogs.msdn.com/debugger/archive/2009/12/30/what-is-a-dump-and-how-do-i-create-one.aspx

Or you can download a Visual Studio 2010 Diagnostic Tool from http://visualstudiogallery.msdn.microsoft.com/en-us/e8649e35-26b1-4e73-b427-c2886a0705f4. You can get detailed description about how to use it to collect dump file.

************************************************************
Please zip the file and use "FeedbackID-611486" as prefix of the file name.

************************************************************
You can use the following workspace to upload the file:
https://sftus.one.microsoft.com/choosetransfer.aspx?key=1d9ea00a-8c28-4453-819d-30256b0b9625
Password is 9f]XUpR2Vq

Thanks again for your efforts and we look forward to hearing from you.
Microsoft Visual Studio Connect Support Team
Posted by Microsoft on 10/7/2010 at 11:23 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
TestDebugging.zip 10/8/2010 54 KB