07/03/2009, 01:26 AM
|
#1 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 699
Likes Received: 6
Thanks: 19
Thanked 160 Times in 72 Posts
|
The book says:
"So you'll want to use the webOS Emulator with integrated JavaScript debugger and DOM inspector." Where is this integrated JS debugger and DOM inspector? I can't figure out how to debug. Nothing JS related shows up in my /var/log/messages either. Anyone? |
07/03/2009, 01:42 AM
|
#3 (permalink) | |
|
Homebrew Developer
![]() Join Date: Jun 2009
Posts: 44
Likes Received: 0
Thanks: 0
Thanked 16 Times in 6 Posts
|
Quote:
|
|
07/03/2009, 01:45 AM
|
#4 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 699
Likes Received: 6
Thanks: 19
Thanked 160 Times in 72 Posts
|
I tried typing my app name (and com.palm.bluetooth) but all I get is 'not found'.
rboatright can you tell us something about how to set it up or are you one of the lucky ones and under NDA? |
07/03/2009, 02:01 AM
|
#6 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 699
Likes Received: 6
Thanks: 19
Thanked 160 Times in 72 Posts
|
Hmmm this doesn't look promising at all.
The log works indeed but I get nothing of any use in it. I can't tell whether my javascript: - gets loaded at all or not - gets executed at all or not - has errors or not - does anything at all Is there any information anywhere on how to get such information? |
07/03/2009, 02:16 AM
|
#7 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: topeka, ks
Posts: 550
Likes Received: 0
Thanks: 4
Thanked 188 Times in 90 Posts
|
to put stuff in the log you can add Mojo.Log calls. (See com.webosinternals.commander for examples.)
re inspector, I have problems but I know this much. after using palm-install to install your app to the emulator,say: palm-launch -d tcp -i com.webosinternals.commander (use your app's 3 part name) then run palminspector and you will see inspector open with the code for your app. Try clicking stuff. |
07/03/2009, 02:20 AM
|
#8 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Silicon Valley, California
Posts: 1,025
Likes Received: 0
Thanks: 37
Thanked 444 Times in 161 Posts
|
You actually can debug through SSH to the emulator.
I connect to the emulator using putty and creating an SSH connection to localhost:5522 Once in, you type debug. That will cause some lines to show up, but won't give you back a prompt. Then you simply hit enter. You can get help by typing help or ? It is a real pain to use, but you can set breakpoints continue and step through your code. You can also see info on locals and args. You can also use the print command to display information about objects. Things like this are why the SDK has not been released publicly. Most developers are used to advance debugging interfaces and something like this can be hard for some people to work with. |
07/03/2009, 05:14 AM
|
#9 (permalink) | |
|
Member
![]() Join Date: Jun 2009
Posts: 2
Likes Received: 0
Thanks: 0
Thanked 0 Times in 0 Posts
|
Quote:
|
|
07/04/2009, 04:55 PM
|
#11 (permalink) |
|
Member
![]() Join Date: Jun 2009
Location: Chicago, IL
Posts: 7
Likes Received: 0
Thanks: 3
Thanked 7 Times in 2 Posts
|
I've got the inspector running properly but I'm surprised that I don't see a javascript debugger. is debugging through the command line the only way to do it? also, wow is this dom inspector slow.
|
07/04/2009, 05:10 PM
|
#12 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Silicon Valley, California
Posts: 1,025
Likes Received: 0
Thanks: 37
Thanked 444 Times in 161 Posts
|
Yep. So far the command line is the only way to do it. To make matters worse, putty SSH doesn't allow the arrow up or down feature to autotype previous commands like in Windows command prompt. It is a real nightmare.
Also, if you want to debug on your phone, you have to flash it with the dev image from Palm. I don't know if that image has leaked. You might be able to do it with a rooted phone, but I haven't tried that. |
07/04/2009, 06:43 PM
|
#14 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: Silicon Valley, California
Posts: 1,025
Likes Received: 0
Thanks: 37
Thanked 444 Times in 161 Posts
|
Really? Whenever I hit up or down, it just gives me a weird bunch of characters. Is there some setting to avoid this? I am using it on Vista 64 bit. I just run SSH from the dialog box. Then I log in as root and type debug. Once in debug mode, I can't use up or down.
|
07/04/2009, 08:46 PM
|
#15 (permalink) |
|
Member
![]() ![]() Join Date: Jun 2009
Location: topeka, ks
Posts: 550
Likes Received: 0
Thanks: 4
Thanked 188 Times in 90 Posts
|
the debug program does not maintain a command buffer, so uparrow does not call back commands. It's a horrible debugger. (d8)
d8 is part of the google v8 javascript interpretor project. There - has - to be a frontend available. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



