07/03/2009, 02:26 AM
|
#1 (permalink) |
|
Member
Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 534
Thanks: 18
Thanked 104 Times in 46 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, 02:42 AM
|
#3 (permalink) | |
|
Homebrew Developer
Join Date: Jun 2009
Posts: 40
Thanks: 0
Thanked 15 Times in 6 Posts
|
Quote:
|
|
|
|
07/03/2009, 02:45 AM
|
#4 (permalink) |
|
Member
Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 534
Thanks: 18
Thanked 104 Times in 46 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, 03:01 AM
|
#6 (permalink) |
|
Member
Join Date: Jun 2009
Location: Sunnyvale CA
Posts: 534
Thanks: 18
Thanked 104 Times in 46 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, 03:16 AM
|
#7 (permalink) |
|
Member
Join Date: Jun 2009
Location: topeka, ks
Posts: 520
Thanks: 4
Thanked 182 Times in 86 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. |
|
|
| Thanked By 2: |
07/03/2009, 03:20 AM
|
#8 (permalink) |
|
Member
Join Date: Jun 2009
Posts: 548
Thanks: 18
Thanked 270 Times in 87 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, 06:14 AM
|
#9 (permalink) | |
|
Member
Join Date: Jun 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
Quote:
|
|
|
|
07/04/2009, 05:55 PM
|
#11 (permalink) |
|
Member
Join Date: Jun 2009
Location: Chicago, IL
Posts: 7
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, 06:10 PM
|
#12 (permalink) |
|
Member
Join Date: Jun 2009
Posts: 548
Thanks: 18
Thanked 270 Times in 87 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, 07:43 PM
|
#14 (permalink) |
|
Member
Join Date: Jun 2009
Posts: 548
Thanks: 18
Thanked 270 Times in 87 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, 09:46 PM
|
#15 (permalink) |
|
Member
Join Date: Jun 2009
Location: topeka, ks
Posts: 520
Thanks: 4
Thanked 182 Times in 86 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. |
|
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -4. The time now is 02:54 PM.






Linear Mode








