ELMAH Code Snippets for Visual Studio

Ever used Code Snippets in Visual Studio? Code Snippets is a great way to reduce keyboard input and help you be more productive by automating typing common lines of code.

At elmah.io we love ELMAH (big surprise). That’s why we have decided to open source the code snippets that we use internally to automate writing code against the ELMAH libraries. The snippets can be found at our organization on GitHub:

https://github.com/elmahio/ELMAHCodeSnippets

Let’s look at an example to see what the possibilities are using these snippets. Ever been frustrated doing manual logging to your ELMAH log using the ErrorSignal type? Not anymore with the tryraise snippet:

tryraise

When hitting the Tab key, the following code is generated:

tryraise Result

Pretty sweet, right? tryraise is one of 6 snippets available, but more will come. We also accept pull requests, so please send us your favorite ELMAH snippets or improve the ones already there.

To install the snippets, simply clone (or download) the git repository and import the snippets in the Code Snippet Manager from within Visual Studio.

But wait there’s more! You don’t even have to install the snippets manually. Our elmah.io extension for Visual Studio already ships with all of the snippets, making it super easy to install them using the Extensions and Updates feature:

Install elmah.io VS extension

Features steps
We monitor your websites

We monitor your websites

We monitor your websites for crashes and availability. This helps you get an overview of the quality of your applications and to spot trends in your releases.

We notify you

We notify you

We notify you when errors starts happening using Slack, HipChat, mail or other forms of communication to help you react to errors before your users do.

We help you fix bugs

We help you fix bugs

We help you fix bugs quickly by combining error diagnostic information with innovative quick fixes and answers from Stack Overflow and social media.

See how we can help you monitor your website for crashes Monitor your website