With the Visual Studio 2010 RC released, here are some tips to help you help us find and fix the remaining issues.
We want Visual Studio to have no bugs. If you want the same and are willing to help us a little, read on! And thanks so much for trying it out!
Help –> Customer Feedback Options
First off, enabling the Customer Experience Improvement Program is a very helpful step!
This will enable sending detailed error reports when Visual Studio crashes or hangs that GREATLY help us to identify the root cause of a problem.
Send Error Report
When Visual Studio crashes or hangs, you will be presented with the so-called "Watson dialog" – a choice to "Send Error Report" or "Do Not Send":
By clicking "Send Error Report" you greatly contribute to making Visual Studio better – this is the one most important thing that will help us the most.
Watson Bucket ID
After the crash has been submitted, two error entries are created in the Application Event Log in Control Panel –> Administrative Tools –> Event Viewer:
Event 1000 and Event 1001 (may also be others, like Event 1023).
The most interesting one is Event 1001, because it will contain the Watson Bucket ID:
Bucket 1040873707, bucket table 1, faulting application devenv.exe, version 10.0.30128.1, stamp 488f2b50, faulting module cslangsvc.dll, version 10.0.30128.1, stamp 488f2dea, debug? 0, fault address 0x000ceedd.
Knowing this bucket, Microsoft employees who are helping you with the problem can find the information you submitted in our tracking system. This is helpful during investigations.
If the error you're seeing reproduces consistently, you can usually get more information by starting Visual Studio with the /log switch like this: devenv.exe /log
This MSDN page contains a nice description of the Visual Studio activity log: http://msdn.microsoft.com/en-us/library/ms241272.aspx
You can find the log file in %APPDATA%\Microsoft\VisualStudio\10.0\ActivityLog.xml
This log is especially useful if the error you're seeing happens at Visual Studio startup when it's loading packages.
Search for the error text
If you're getting an error message, try using your favorite search engine to search the internet for it – maybe someone has already encountered it before?
Log a Connect bug
To actually let us know that you've found a bug, the central location to do this is the Microsoft Connect website: https://connect.microsoft.com/visualstudio/feedback
By opening a bug there it gets directly inside our bug tracking system.
You Can Do More: minidump and call stack
A while ago I wrote an article called How to debug crashes and hangs. This article explains in great detail what steps you need to do to create a minidump with heap of Visual Studio when it has crashed or is hanging.
The simple way is, if you're running Windows Vista or later, just open Task Manager, click Processes, find the Visual Studio process (devenv.exe), right-click and select Create Dump File.
That's it! It will create the large minidump file in your Temp directory and show a message box with the path where it saved the file.
The original article can help if you're running Windows XP or in a more advanced case, when you also want to get the call stack, load symbols and so on. But usually a minidump file (.dmp) should be sufficient.
How to send us the minidump
The minidump file is usually huge (hundreds of megabytes), because it contains the exact snapshot of the full process memory of devenv.exe. To send us the minidump, open a bug on Connect and mention that you have a dump file. The MS employee who looks at the bug should give you a path to the temporary FTP website where you can upload the dump using FTP. If they don't give you this site or you have any other problems, just let me know.
Debugging errors that are not crashes using First Chance Exceptions
You might encounter an error which does not fully crash Visual Studio, and does not show the Watson dialog. In this case, there is still a good chance of finding what's going on and providing us with useful information about the error.
For this you'll need to attach a debugger to the Visual Studio process (usually open another Visual Studio side by side). Again, a detailed tutorial is here. Just before the error is about to happen, break into debugger, and enable first chance exceptions (check everything in Debug –> Exceptions). Then resume debugging and let the error happen. Chances are that the exception will be thrown, but it will be subsequently suppressed. Enabling first-chance exceptions helps you to preview that exception before it gets swallowed. Once the exception happens, copy the Call Stack from the debugger Callstack toolwindow (Ctrl+A) and paste it into notepad. Sending us this call stack will be invaluable. Also, you can go to Debug –> Save Dump As and create a minidump with heap file (.dmp) from the current debuggee process state. Again, sending us this dump file and the call stack should really help a lot.
One warning here is that there might be "red herrings" along the way – false first-chance exceptions which are normal and do not lead to an error. If you can't tell whether the first-chance exception you're seeing is normal or is the actual root cause of the error, send us the call stack for this and we'll be able to help further.
If you believe that you've gotten Visual Studio into a weird state with weird settings, one last resort is trying to start Visual Studio with the /ResetSettings switch:
This will reset the Visual Studio settings to the defaults and maybe help you solve the problem.
If you've had a Package Load Failure, running devenv.exe with the /ResetSkipPkgs flag will re-enable those failed packages and will try loading them again.
As a last resort, you can also try /ResetUserData.
devenv.exe Command Line Switches
Here are other Visual Studio command line switches: http://msdn.microsoft.com/en-us/library/xee0c8y7.aspx
New: Visual Studio Setup Log Collection Utility
Check out the instructions here on how to use collect.exe to collect the logs: http://blogs.msdn.com/heaths/archive/2008/05/09/visual-studio-and-net-log-collection-utility.aspx
Thanks again for making Visual Studio a better product!