Create crash dump file in Windows Phone

Your app got crash ?

This is very handy snippet for you :

private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
 if (System.Diagnostics.Debugger.IsAttached)
// An unhandled exception has occurred; break into the debugger
 System.IO.IsolatedStorage.IsolatedStorageFile f = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication();
 using(StreamWriter w = new StreamWriter(f.OpenFile("crashLog.txt",FileMode.Create)))

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s