Click here to Skip to main content
15,881,248 members
Articles / Programming Languages / C#

Exception Occurred? – Get Troubleshooting Tips from Your Favorite Blogs

Rate me:
Please Sign up or sign in to vote.
5.00/5 (9 votes)
6 Jan 2011CPOL2 min read 19.3K   6   9
Get troubleshooting tips from your favorite blogs

In this blog post, I am going to share a quite interesting tips, where you can customize the “Exception Assistant” in Visual Studio. As an example, I have shown how we can set some favorite blogs urls in troubleshooting tips section.

image

Well, Let’s start with bit background to get an clear idea. We all knows that Visual Studio have very smart exception handler that helps us to provides many information to troubleshoots. Whenever an exception raised in Visual Studio, a dialog window appears which called as “Exception Assistant”. This dialog displays what type of exception it is, what are the different Action you can take and also troubleshoot tips.

image

By default “Exception Assistant” is enabled, If you can configure it by navigating “Tools > Options > Debugging > Enable the Exception Assistant”.

image

If it’s disabled, on raised of any exception, you will get below exception message window for every exception.

image

To know more about Exception Assistant, please read this blog post The Exception Assistant .

Now, come back to actual topic of discussion, How we can customize the things that are seeing in "Exception Assistant” window. Yes, all the information that are displayed in exception assistant actually fetched from an XML (DefaultContent.XML ) file which stored at C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ExceptionAssistantContent\1033”.

If you open that XML File, in any editor, you will see content are very simple. You have to provide the Exception Type and Tips details.

image

As you can see, Exception types are given as “*” which means, this Tips will show for any kind of exception. But, if you want to get some information link based on the Exception Type, you to specify the exception type.

image

When It Is Very Useful?

This will be very much useful when you are creating any custom exception class and you want to provide your custom information.

image

Summary

In this post, I have explained how we can customize the Exception Assistant window and how we can set custom help url for custom exception class.

Hope this will help !

Thanks !

AJ

Filed under: Tips and Tricks, Visual Studio
Image 8 Image 9 Image 10 Image 11 Image 12 Image 13 Image 14 Image 15

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
India India
.NET Consultant | Former Microsoft MVP - ASP.NET | CodeProject MVP, Mentor, Insiders| Technology Evangelist | Author | Speaker | Geek | Blogger | Husband

Blog : http://abhijitjana.net
Web Site : http://dailydotnettips.com
Twitter : @AbhijitJana
My Kinect Book : Kinect for Windows SDK Programming Guide

Comments and Discussions

 
GeneralMy vote of 5 Pin
CodeRichardWong23-Jan-11 14:17
CodeRichardWong23-Jan-11 14:17 
GeneralGood stuff.. Pin
m@dhu6-Jan-11 19:08
m@dhu6-Jan-11 19:08 
GeneralMy vote of 5 Pin
Baji Jabbar6-Jan-11 19:05
Baji Jabbar6-Jan-11 19:05 
GeneralMy vote of 5 Pin
prasad026-Jan-11 19:04
prasad026-Jan-11 19:04 
GeneralMy 5 for your work. Pin
Kasson6-Jan-11 18:49
Kasson6-Jan-11 18:49 
GeneralMy vote of 5 Pin
Sandeep Mewara6-Jan-11 18:44
mveSandeep Mewara6-Jan-11 18:44 
GeneralMy vote of 5 Pin
Ankur\m/6-Jan-11 18:42
professionalAnkur\m/6-Jan-11 18:42 
GeneralMy vote of 5 Pin
Pranay Rana6-Jan-11 18:25
professionalPranay Rana6-Jan-11 18:25 
GeneralMy vote of 5 Pin
Kunal Chowdhury «IN»6-Jan-11 16:52
professionalKunal Chowdhury «IN»6-Jan-11 16:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.