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 (Bot fixing redirect link) |
||
| Line 5: | Line 5: | ||
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.forum.nokia.com/ | + | * You have installed latest version of '''Aptana WRT Plugin''' ([http://www.forum.nokia.com/Develop/Web/Tools/]) |
| − | * You have '''Firefox''' installed on your system ([http://www.mozilla.com/firefox/]) | + | * You have '''Firefox''' installed on your system ([http://www.mozilla.com/en-US/firefox/new/]) |
For '''basic information about the Aptana WRT Plugin''', please check this Forum Nokia Wiki Article: [[Aptana WRT Plugin Basics]]. | For '''basic information about the Aptana WRT Plugin''', please check this Forum Nokia Wiki Article: [[Aptana WRT Plugin Basics]]. | ||
| Line 14: | Line 14: | ||
First step is to install the Aptana JavaScript debugger, as described here: [http://www.aptana.com/docs/index.php/Installing_the_JavaScript_debugger Installing the JavaScript debugger]. | First step is to install the Aptana JavaScript debugger, as described here: [http://www.aptana.com/docs/index.php/Installing_the_JavaScript_debugger 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: | ||
Revision as of 16:02, 27 May 2011
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 Forum Nokia Wiki Article: 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: 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.

