How to debug Enyo App WebOS 3.0?
Asked Answered
G

4

5

i am nooby to WebOS3.0 (also in Mojo). And now days i am working on palm pad apps dev. and i want to know how to debug enyo apps?

Grethel answered 29/6, 2011 at 13:43 Comment(0)
A
8

You can run enyo apps in a webkit browser with mock services. Then just use the Chrome debugging tools.

Note that you'll have to start Chrome with the necessary command line switches to allow for file access or cross domain xhr.

If you need to debug against your app in the emulator or a device you can use the Ares debugger. https://ares.palm.com/AresDebug/

Ainu answered 2/7, 2011 at 4:53 Comment(0)
K
2

For most of your debugging, you should be able to use Chrome with the " --allow-file-access-from-files" switch. However, as I have been working with saving user preferences, developing services, etc, I have found that running the emulator and using palm-run from inside the project directory is the easiest way to debug some of the more in-depth items.

There are some cool web-based loggers out there, but if you configure Console2 with an extra-wide setting, and stick with that, your logging from the emulator is easy enough to read off of the command line (or powershell).

Kennard answered 13/7, 2011 at 16:34 Comment(0)
E
2

If you want to print to a log, from the device, put one of the following in your code:

  • enyo.Log("...");
  • enyo.Warn("...");
  • enyo.Error("...");

Then, with your device in developer mode, run "palm-log -f your.app.id". The -f flag makes the log follow the app, instead of printing once and quitting. Note that this requires the log level to be set high enough to print. To set log level on the touchpad, run the device info app. Select "custom application" from he app menu, and enter "##logs#". Keep in mind that running the device with logging enabled (not at minimum) can slow it down.

Elamitic answered 12/2, 2012 at 18:13 Comment(0)
M
1

If you use localstorage.getItem() and localStorage.setItem() that will work in both Chrome and on the device, meaning you can test the saving and restoring of preferences and settings etc without having to leave Chrome (and keep re-packaging and installing the app). You can also use the Chrome dev tools then to inspect these methods and the local storage section of the resources tab.

Marquittamarr answered 16/7, 2011 at 19:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.