JavaScript error reporting: DamnIT
Hey there! Welcome to Making the Web - my personal blog about website development. Feel free to subscribe to my RSS feed to keep up with the latest. Alternatively, subscribe by email. Hope you enjoy this article!
Creating compatible and portable Javascript scripts can be extremely hard. We, as developers, can test our scripts in as many browsers as we want, but, there always seems to be problems.
Now, when an error occurs, what usually happens? The browser shows a little yellow symbol in the bottom-left corner of the screen (in IE at least - I might as well use it as a good example: it is the most popular browser). The visitor will usually just ignore the error for two reasons:
- They don't know what the error means most of the time, unless they are Javascripters themselves; and
- They don't really care about your site and the errors - why should they?
Because they ignore them, and you have no idea they exist, bugs in your applications may go unnoticed for weeks, or even months. And, all the time your application is not functioning as expected, visitors are seeing your service as unprofessional and will simply go to your competitors.
But, thankfully, there is a way to catch and fix these errors. A new service called DamnIT will send you emails whenever there is a problem on the client-side. Here's an example message:

One thing that the service could be used for is client-side error detection and reporting during BETA tests.
Here are some great benefits of the service:
- It allows the user to enter some details about the error, and what they did before the error;
- It can be incorporated in to JavaScriptMVC easily; and
- Error messages are very informative - they contain browser details, user's description and the error's line number
There is also another great benefit of DamnIT. That is its error management section. This section lists the most recent errors, and the most common - so you can prioritize. It will even categorize by browser:

To use DamnIT is simple - you don't have to touch any of your existing script. All you have to do is put this code on to your page:
<script type='text/javascript' src='https://damnit.jupiterit.com/damnit.js?_KEY_'></script>
And it is as simple as that - after obtaining your key, you will automatically receive error details by email within a few seconds.











