Practical .NET

Quick Tip: Read the Inner Exception!

That's often where the real problem is.

Another short tip, but, potentially the best one you'll ever get (at least, from me).

When you're debugging and you get an exception, always, always, always click on the View Details link to open the View Details dialog.

If the message in the dialog isn't expanded, expand it, then scan down to the Inner Exception entry. Sometimes it's null, but more often than not, that's where the original problem (and the one you have to fix) is described.

In fact, it's often worthwhile to expand the Inner Exception and read its Inner Exception property.

More Practical .NET Debugging Tips from Peter Vogel:

About the Author

Peter Vogel is a system architect and principal in PH&V Information Services. PH&V provides full-stack consulting from UX design through object modeling to database design. Peter tweets about his VSM columns with the hashtag #vogelarticles. His blog posts on user experience design can be found at http://blog.learningtree.com/tag/ui/.

comments powered by Disqus

Featured

  • Copilot Workspace Does Web App in Minutes, No Coding Required

    Here's a taste of our no-coding future, thanks to Copilot AI.

  • Microsoft Previews Mads Kristensen Keynote at Orlando Dev Conference

    Microsoft today previewed a keynote presentation by Visual Studio guru Mads Kristensen at an upcoming developer/IT pro event where he will be joined by other company dev luminaries such as Jon Galloway, Rachel Kang, and James Montemagno.

  • Syncfusion Open Sources 14 Controls for .NET MAUI

    Third-party .NET-centric dev UI tooling specialist Syncfusion this week announced the open sourcing of 14 controls for .NET MAUI, the evolution of Xamarin.Forms that adds support for building desktop apps.

  • Kubernetes for Developers

    "Kubernetes has a lot of 'moving parts' so can be intimidating at first," says Dan Wahlin, a principal cloud developer advocate at Microsoft who promises to explain everything at a developer conference next month in Orlando.

Subscribe on YouTube