07/02/2009, 08:54 AM
|
#1 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Melbourne, FL
Posts: 798
Likes Received: 1
Thanks: 6
Thanked 303 Times in 121 Posts
|
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. |
07/02/2009, 09:17 AM
|
#2 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 5
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
|
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. |
07/02/2009, 09:35 AM
|
#3 (permalink) |
|
Member
![]() Join Date: May 2009
Posts: 5
Likes Received: 0
Thanks: 0
Thanked 2 Times in 1 Post
|
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"? |
07/02/2009, 01:50 PM
|
#4 (permalink) |
|
Member
![]() Join Date: Jun 2009
Posts: 5
Likes Received: 0
Thanks: 0
Thanked 1 Time in 1 Post
|
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. |
07/02/2009, 04:11 PM
|
#5 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Posts: 30
Likes Received: 0
Thanks: 4
Thanked 2 Times in 2 Posts
|
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 |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



