webOS Nation Forums
> webOS apps and software
> webOS development
>
Debugging Tip
Member:
Arcticus
at: 09:54 AM 07/02/2009
Here is a quick debugging tip to look for syntax and other errors. SSH into the emulator and navigate to "root@qemux86:/var/log" then do "vi messages" and scroll to the end using page down. This is the emulators error log, I believe you also need to set your "logLevel": "99" in your appinfo.json file.
Just in case to exit vi type ':' then 'q' 'enter'
Also this is not a dynamic log you will need to quit and reopen to see updates as you run your app.
Member:
Trano
at: 10:17 AM 07/02/2009
To see a dynamic update of the log you can do:
tail -f /var/log/messages
This will keep show you all the updates as they are written to the log. I've been using this and it has helped out a lot.
Member:
sbc
at: 10:35 AM 07/02/2009
Debugging has been killing me. Can we make this the "Official" Debugging Tips thread. Are there any others tips out there?
Is debugging easier with a rooted Pre vs just using the emulator? (Any such thing as a rooted emulator?)
How are folks debugging "white screens"?
Member:
Trano
at: 02:50 PM 07/02/2009
The emulator is already rooted and has ssh listening on port 5522. You have to connect to that to run the command I mentioned before. I find it easier to debug on the emulator, but that is just my opinion.
As far as the "white screen", I only encountered this once and it was because of a syntax error in my javascript. I was able to debug it by looking at the messages log which told me that it was a syntax error and which line it was on.
Member:
schoksi
at: 05:11 PM 07/02/2009
for anyone reading, in case you're a complete rookie to the terminal like me the command to SSH into the terminal is:
ssh -p 5522 root@localhost
from:
pre dev wiki: Enable Root Access
thanks for this thread guys, makes debugging much easier
webOS Nation Forums
> webOS apps and software
> webOS development
>
Debugging Tip