Archived:Aptana WRT Plugin - displaying log messages in output console
hamishwillee
(Talk | contribs) m (Automated change of category from Web Runtime (WRT) to Symbian Web Runtime) |
hamishwillee
(Talk | contribs) m (Hamishwillee - Bot update - Fix links) |
||
| (7 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | [[ | + | {{Archived|timestamp=20110815051133|user=[[User:Hamishwillee|<br />----]]|Aptana has been superseded by the [http://www.developer.nokia.com/Develop/Web/Tools/Nokia_Web_Tools/ Nokia Web Tools], an IDE and Simulator based on Aptana and Eclipse. While you may still be able to use Aptana directly (as described in this document), the Nokia Web Tools are easier to install and represent a more optimised and better maintained toolchain for mobile web runtime development.}} |
| + | {{ArticleMetaData <!-- v1.2 --> | ||
| + | |sourcecode= <!-- Link to example source code e.g. [[Media:The Code Example ZIP.zip]] --> | ||
| + | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| + | |devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') --> | ||
| + | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Qt SDK 1.1.4]) --> | ||
| + | |platform= <!-- Compatible platforms - e.g. Symbian^1 and later, Qt 4.6 and later --> | ||
| + | |devicecompatability= <!-- Compatible devices e.g.: All* (must have internal GPS) --> | ||
| + | |dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --> | ||
| + | |signing= <!-- Signing requirements - empty or one of: Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| + | |keywords= <!-- APIs, classes and methods (e.g. QSystemScreenSaver, QList, CBase --> | ||
| + | |language= <!-- Language category code for non-English topics - e.g. Lang-Chinese --> | ||
| + | |translated-by= <!-- [[User:XXXX]] --> | ||
| + | |translated-from-title= <!-- Title only --> | ||
| + | |translated-from-id= <!-- Id of translated revision --> | ||
| + | |review-by= <!-- After re-review: [[User:username]] --> | ||
| + | |review-timestamp= <!-- After re-review: YYYYMMDD --> | ||
| + | |update-by= <!-- After significant update: [[User:username]]--> | ||
| + | |update-timestamp= <!-- After significant update: YYYYMMDD --> | ||
| + | |creationdate= 20090610 | ||
| + | |author= [[User:Jappit]] | ||
| + | }} | ||
| + | [[Category:Symbian Web Runtime]][[Category:IDE]] | ||
This article explains '''how to display log messages in Aptana Output console''', useful for '''debugging Web Runtime widgets'''. | This article explains '''how to display log messages in Aptana Output console''', useful for '''debugging Web Runtime widgets'''. | ||
| Line 5: | Line 28: | ||
This article assumes that: | This article assumes that: | ||
* You have installed latest version of '''Aptana IDE''' ([http://www.aptana.com/]) | * You have installed latest version of '''Aptana IDE''' ([http://www.aptana.com/]) | ||
| − | * You have installed latest version of '''Aptana WRT Plugin''' ([http://www. | + | * You have installed latest version of '''Aptana WRT Plugin''' ([http://www.developer.nokia.com/Develop/Web/Tools/]) |
| − | * You have '''Firefox''' installed on your system ([http://www.mozilla. | + | * You have '''Firefox''' installed on your system ([http://www.mozilla.org/en-US/firefox/new/]) |
| − | For '''basic information about the Aptana WRT Plugin''', please check this | + | For '''basic information about the Aptana WRT Plugin''', please check this Nokia Developer Wiki Article: [[Archived:Aptana WRT Plugin Basics]]. |
==How to display log messages== | ==How to display log messages== | ||
===Install the Aptana JavaScript debugger=== | ===Install the Aptana JavaScript debugger=== | ||
| − | First step is to install the Aptana JavaScript debugger, as described here: [http:// | + | First step is to install the Aptana JavaScript debugger, as described here: [http://wiki.appcelerator.org/display/tis/Home Installing the JavaScript debugger]. |
| − | Fastest way to install the debugger Extension in FireFox, is through this direct link: [http:// | + | Fastest way to install the debugger Extension in FireFox, is through this direct link: [http://update2.aptana.org/firefox/20110408/aptanadebugger.xpi Aptana JavaScript debugger Firefox extension] |
===Add aptana.log() to your code=== | ===Add aptana.log() to your code=== | ||
In order to display a log message from your WRT widget, you have to use the following code: | In order to display a log message from your WRT widget, you have to use the following code: | ||
| Line 23: | Line 46: | ||
In order to use the JavaScript debugger, you have to run your WRT project in Debug mode. So, just right-click the '''"wrt_preview_frame.html"''' file and then select '''Debug as''' -> '''JavaScript Web Application'''. | In order to use the JavaScript debugger, you have to run your WRT project in Debug mode. So, just right-click the '''"wrt_preview_frame.html"''' file and then select '''Debug as''' -> '''JavaScript Web Application'''. | ||
| − | If you don't know how to create a new Web Runtime project from Aptana, check this article: [[Aptana WRT Plugin Basics]]. | + | If you don't know how to create a new Web Runtime project from Aptana, check this article: [[Archived:Aptana WRT Plugin Basics]]. |
The Aptana Debug perspective should automatically be opened, and the project started inside Firefox. In case this does not happen: | The Aptana Debug perspective should automatically be opened, and the project started inside Firefox. In case this does not happen: | ||
| Line 31: | Line 54: | ||
Once the Debug process has started, your messages will be automatically shown in the Aptana Console view. | Once the Debug process has started, your messages will be automatically shown in the Aptana Console view. | ||
If the Console is not opened, just go, from the Aptana menu, to '''Window''' -> '''Show view''' -> '''Console'''.<br/> | If the Console is not opened, just go, from the Aptana menu, to '''Window''' -> '''Show view''' -> '''Console'''.<br/> | ||
| − | [[ | + | [[File:Aptana javascript debugger.png]] |
Latest revision as of 02:54, 29 June 2012
Aptana has been superseded by the Nokia Web Tools, an IDE and Simulator based on Aptana and Eclipse. While you may still be able to use Aptana directly (as described in this document), the Nokia Web Tools are easier to install and represent a more optimised and better maintained toolchain for mobile web runtime development.
Article Metadata
This article explains how to display log messages in Aptana Output console, useful for debugging Web Runtime widgets.
Contents |
Prerequisites
This article assumes that:
- You have installed latest version of Aptana IDE ([1])
- You have installed latest version of Aptana WRT Plugin ([2])
- You have Firefox installed on your system ([3])
For basic information about the Aptana WRT Plugin, please check this Nokia Developer Wiki Article: Archived:Aptana WRT Plugin Basics.
How to display log messages
Install the Aptana JavaScript debugger
First step is to install the Aptana JavaScript debugger, as described here: Installing the JavaScript debugger.
Fastest way to install the debugger Extension in FireFox, is through this direct link: Aptana JavaScript debugger Firefox extension
Add aptana.log() to your code
In order to display a log message from your WRT widget, you have to use the following code:
aptana.log("Your log message");
Start the Debug process
In order to use the JavaScript debugger, you have to run your WRT project in Debug mode. So, just right-click the "wrt_preview_frame.html" file and then select Debug as -> JavaScript Web Application.
If you don't know how to create a new Web Runtime project from Aptana, check this article: Archived:Aptana WRT Plugin Basics.
The Aptana Debug perspective should automatically be opened, and the project started inside Firefox. In case this does not happen:
- to open the Debug perspective, from the Aptana menu go to Window -> Open Perspective -> Debug
- if Firefox is not opened, right click on "wrt_preview_frame.html" file and then select Debug as -> Debug.... Then, in the "Main" panel, set the Browser executable field to your Firefox executable path. (e.g.: C:\Programmi\Mozilla Firefox\firefox.exe)
See your messages in the Output console
Once the Debug process has started, your messages will be automatically shown in the Aptana Console view.
If the Console is not opened, just go, from the Aptana menu, to Window -> Show view -> Console.

