Saturday, March 5, 2011

Introduction to Adobe AIR: Part 4

Today we'll learn about debugging.

To run an AIR application - you have to compile it, install it and run. Just imagine that you'd have to do that every time you wanted to test something! Very time consuming and frustrating. Luckily, we can use a debugger to test AIR before even compiling it. Horray!

If we talk about Adobe Flash - it has a built-in debugger, and to test it you simply need to run the swf movie. It's different with AIR SDK, though - to test your application, you need to use something called AIR Debug Launcher (ADL) which comes with the SDK. Here's how you work it:

Say, you already have created a HTML/Javascript based AIR application and would like to test it. If you're using Windows - go to Start > Run, enter "cmd" and hit Ok.



Mac OS X users need to open the terminal console: Applications > Utilities. Enter path to your main project folder this way:

cd path/to/your/ProjectFolder

Change the path/to/your/ProjectFolder part to the real path of your folder. After that, enter this:

adl myapplication.xml

Change the myapplication.xml to the real xml descriptor name. After you hit enter, the AIR application should open in a new window.

Note, that if you're using Ajax (HTML and Javascript) to build your AIR, you can test it in a web-browser as well. AIR is built on the same core as Safari browser by Apple, so you could test your application in Safari and it will look very similar to the real AIR application. Remember that there are limitations for the browser, such as no access to the file system.

And that's how you do it! We'll talk about signing your applications in the next tutorial.

Thanks for reading!

Related:

Introduction to Adobe AIR: Part 1
Introduction to Adobe AIR: Part 2
Introduction to Adobe AIR: Part 3
Introduction to Adobe AIR: Part 5
Introduction to Adobe AIR: Part 6
Introduction to Adobe AIR: Part 7
Introduction to Adobe AIR: Part 8
Introduction to Adobe AIR: Part 9

1 comment:

electronic signature Microsoft said...

Adobe air is great application. It runtime enables developers to use HTML, Adobe Flash Professional software,JavaScript etc to build web applications that run as standalone client applications without the constraints of a browser. There are lot of benefits of it like accelerate development with code reuse.

Post a Comment