Debugging Script Errors

The last thing that I want to mention in this chapter is how to debug errors in remote Azure Mobile Service scripts. If something goes wrong in your insert.js script, for example, then it is hard to know this from your local computer.

Fortunately, you can view a log of all error messages associated with your Mobile Service scripts in the Windows Azure Management Portal. Navigate to http://manage.WindowsAzure.com, select your Mobile Service, and click the Logs tab. All error messages are logged here (see Figure 10.9).

Image

FIGURE 10.9 Viewing the Mobile Service Logs

You can even log custom messages by calling console.log() ...

Get Windows® 8.1 Apps with HTML5 and JavaScript Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.