LP Pinsonneault blog's

Windows 8, Windows Phone, ...

NAVIGATION - SEARCH

Tracking Errors in your Windows Phone applications with BugSense

Building an application 100% bullet proof is somewhat something impossible, mainly in when the application can be use by wide range of customer. In Windows Phone, we are affected by the device, the connectivity, the lock screen, etc.). In some combination of event an error can occurred that have not been tested.

So my philosophy about that is to be pro-active. So i don’t want to wait the complaint of customer, i want to know when an error occurred with as much information to help me reproduce the problem to finally fix the issue.

To achieve this goal, there is some analytics component available for Windows Phone 7. Some of those are able to tracking the errors that might occur in your application. But i find out a nice component, that do the a really great job.

BugSense is a really simple component. When i mean simple, it’s really simple add the component and add 1 line of code in the App.xaml.cs and your done. The component can be download as standalone package or you use NuGet to install the package.

Here is a screen of the only line of code that is required by the component.

On the website you have access to a nice Dashboard that will provide you with a lot of information about the error and the recurrence.

image

image

image

image

image

 

image

 

You can if you want replace the default UnhandledException event with the event that is built-in the component, you can do it:

public App()
{  
  BugSenseHandler.Instance.Init(this, "Your_API_Key"); 
  BugSenseHandler.Instance.UnhandledException += OnUnhandledException; 
  //UnhandledException += Application_UnhandledException;
  ...
}

You can also trap the exception in your try..catch statement:

try {    
   //Some code to execute
}
catch (Exception ex) {    
   BugSenseHandler.HandleError(ex);
}

So what happen when there is an error, the user will get notified and a report will be sent to the BugSense so you can get notified and review the error. As you can see there is some options, that allow you to control the popup window that show up by default (yes you can turn it off if you want).

Once an error is logged you indicate in your account to receive Email notification. Which is a good idea when you want to have a nice application (that don’t bug too often Smile).

image

 

It’s the first time i use this component and I'm very impressed by the quality of the tools and all the feature it provide (client side and server side). What to say more … I'll use it in future applications. Oh yay … i practically forgot that it FREE. www.bugsense.com

Regards,
LP

Add comment

biuquote
  • Comment
  • Preview
Loading