Tutorials webOS Debugging 101
Add mojo.logs to your code and evaluate them in putty.
Mojo.Log.error("****V" + " my variable: " + this.variable );
Alternatively you can use Mojo.Log.error("my JSON variable: %j", this.jsonObject); or Mojo.Log.error("my JSON variable: "+ JSON.stringify(this.jsonObject)); to log JSON Objects.
putty.exe (for emulator)
ip address "localhost" port 5522
connection type: ssh
when command line opens, type
no password just hit enter
grep payment /var/log/messages
"payment" is the string you are searching for with grep
after you log in to putty:
Mojo.Log.error writes to /var/log/messages
grep: searches for the string following grep within the file specified after the search string, and prints out those lines
SIDE NOTE: if you copy text into the clipboard, you can paste it into putty by right-clicking in putty.