Allows conditional execution of code in a JavaScript Windows Store app.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

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.


The latest version can be downloaded from the Downloads tab.

The JavaScript Debug Symbols for WinRT module is also available on 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

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:
//   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);


        return true;

More information