Difference between revisions of "Tutorials webOS Debugging 101"
Jump to navigation
Jump to search
(adding/organizing debugging help for newbies) |
(adding/organizing debugging help for newbies) |
||
Line 1: | Line 1: | ||
− | |||
Add mojo.logs to your code and evaluate them in putty. | Add mojo.logs to your code and evaluate them in putty. | ||
Line 7: | Line 6: | ||
putty.exe | putty.exe | ||
(for emulator) | (for emulator) | ||
− | ip address "localhost" port 5522 | + | <p>ip address "localhost" port 5522</p> |
− | connection type: ssh | + | <p>connection type: ssh</p> |
− | when command line opens type root | + | <p>when command line opens type root</p> |
− | no password just hit enter | + | <p>no password just hit enter</p> |
− | type: cat /var/log/messages | grep payment | + | <p>type: cat /var/log/messages | grep payment</p> |
− | "payment" is the string you are searching for with grep | + | <p>"payment" is the string you are searching for with grep</p> |
− | after you log in to putty: | + | <p>after you log in to putty:</p> |
− | mojo.log.error writes to /var/log/messages | + | <p>mojo.log.error writes to /var/log/messages</p> |
− | cat: types the file out | + | <p>cat: types the file out</p> |
− | grep: searches it for the string following grep and prints out those lines | + | <p>grep: searches it for the string following grep and prints out those lines</p> |
− | | (vertical bar): says pass the output of cat over to grep | + | <p>| (vertical bar): says pass the output of cat over to grep</p> |
− | SIDE NOTE: if you copy text into the clipboard, you can paste it into putty by right-clicking in putty. | + | <p>SIDE NOTE: if you copy text into the clipboard, you can paste it into putty by right-clicking in putty.</p> |
Revision as of 04:56, 15 September 2009
Add mojo.logs to your code and evaluate them in putty.
Mojo.Log.error("****V" + " my variable: " + this.variable );
putty.exe
(for emulator)
ip address "localhost" port 5522
connection type: ssh
when command line opens type root
no password just hit enter
type: cat /var/log/messages | grep payment
"payment" is the string you are searching for with grep
after you log in to putty:
mojo.log.error writes to /var/log/messages
cat: types the file out
grep: searches it for the string following grep and prints out those lines
| (vertical bar): says pass the output of cat over to grep
SIDE NOTE: if you copy text into the clipboard, you can paste it into putty by right-clicking in putty.