This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public App() | |
{ | |
this.InitializeComponent(); | |
this.Suspending += OnSuspending; | |
// Initialize BugSense | |
BugSenseHandler.Instance.Init(this, "YOUR_API_KEY"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Localized fix notifications */ | |
BugSenseHandler.SetLocalizedFixNotifications( | |
"Un correctif est disponible", // Title | |
"S\'il vous plaît mettre à jour à la version dernière" // Content | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Send event */ | |
BugSenseHandler.Instance.SendEvent("anEvent"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Alternatively you can initialize the plugin to work | |
* along with the Visual Studio debugger | |
*/ | |
public App() | |
{ | |
// Global handler for uncaught exceptions. | |
BugSenseHandler.Instance.Init(this, "YOUR_API_KEY", new NotificationOptions() { HandleWhileDebugging = true }); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Set Last Action */ | |
public App() | |
{ | |
// Global handler for uncaught exceptions. | |
BugSenseHandler.Instance.Init(this, "YOUR_API_KEY"); | |
BugSenseHandler.SetLastBreath(MyMethod); | |
// ...do more stuff... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the app | |
var app = WinJS.Application; | |
// Initialize bugsense | |
var bugsense = new Bugsense( { | |
apiKey: 'YOUR_API_KEY', | |
context: app | |
} ); | |
// If you want to display a popup (against MS guidelines) add the message option |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add metadata | |
bugsense.addExtraData( 'user_level', 'paid' ); | |
bugsense.addExtraData( 'account', 'CEO' ); | |
// Clear all metadata | |
bugsense.clearExtraData(); | |
// leave breadcrumb | |
bugsense.leaveBreadcrumb( 'Fetch Friendlist' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
rotateScreen(); | |
} catch ( error ) { | |
bugsense.notify( error, { rotation: 'not supported' } ) | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://www.bugsense.com/static/js/global/bugsense.js" type='text/javascript'></script> | |
<script type="text/javascript"> | |
var bugsense = new Bugsense( { apiKey: 'YOUR_API_KEY' } ); | |
</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Without extra data | |
try | |
{ | |
throw new Exception("error"); | |
} | |
catch (Exception exc) | |
{ | |
BugSenseHandler.Instance.LogException(exc); | |
} |