Allows conditional execution of code in a JavaScript Windows Store app.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
demo
js
.gitignore
LICENSE.txt
README.md

README.md

JavaScript Debug Symbols for WinRT

This module adds a property to the Debug global object that you can query to detect if the application is running with the Debug build configuration selected, allowing conditional execution of JavaScript code in a Windows Store app.

Download

The latest version can be downloaded from the Downloads tab. https://github.com/CaioProiete/WinRT-JsDebugSymbols/downloads

The JavaScript Debug Symbols for WinRT module is also available on nuget.org via package name WinRT-JsDebugSymbols.

To install WinRT-JsDebugSymbols, run the following command in the Package Manager Console:

PM> Install-Package WinRT-JsDebugSymbols

More information about NuGet package avaliable at https://nuget.org/packages/WinRT-JsDebugSymbols

Getting Started

Add a reference to the debugSymbols.js script in the header section of the default.html file:

<script src="/js/debugSymbols.js"></script>

Now you can query the Debug.isDebugBuild property during the execution of the Windows Store app to determine if the app is running a Debug build or not.

Example

// Example:
//   Show a dialog box with details of any unhandled
//   exceptions occurring in the application, only for
//   Debug builds.
if (Debug.isDebugBuild) {
    WinJS.Application.onerror = function (e) {

        var dialog = new Windows.UI.Popups.MessageDialog(
            e.detail.stack, e.detail.message);

        dialog.showAsync().done();

        return true;
    };
}

More information