Windows Phone + Cordova Quick Tip

When javascript doesn't seem to be working, I usually hack in a quick error handler.If you add this somewhere at the top of your html page, you should see any errors that occur listed in Visual Studio's output window.

window.onerror = function(errMsg,fileName,ln) {
    window.external.Notify("Error : " + errMsg + 
            ", In file : " + fileName + 
            ", at line number:" + ln);
}