Chapter 8. Debugging, Testing, and Documenting

More than with any other programming language, the dynamic nature of JavaScript makes it fundamental to have the proper tools in order to increase the quality of our applications. This chapter will provide an introduction to some important tools used for debugging, testing, and documenting Sencha Touch applications.

Of course, “testing” is a rather large concept, and it would be foolish to pretend that this chapter will give you a complete overview of testing Sencha Touch apps. However, these simple techniques will allow you and your team to increase your quality, helping you ship code on schedule.

Debugging

Debugging your application is certainly an art. Thankfully, JavaScript developers do not need to rely on the good old alert() debugging technique anymore. In this section, we are going to learn about more modern and effective ways to debug your application:

  • WebKit Web Inspector
  • Remote Debugging (for iOS 6 and OS X Mountain Lion)
  • Adobe Edge Inspect (formerly “Adobe Shadow” and “weinre”)

WebKit Web Inspector

The first tool that will be used to debug mobile web applications is the Web Inspector that ships natively with WebKit-based browsers. It is a very powerful tool, originally inspired by the famous Firebug plug-in for Firefox by Joe Hewitt; these days, the WebKit Web Inspector, Opera DragonFly, or the Internet Explorer Developer Tools all allow you to perform the following functions:

  • Inspect the HTML structure of the current web ...

Get Sencha Touch 2 Up and Running 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.