webOS Nation Forums
> webOS apps and software
> webOS development
>
How the hell do you guys debug?
Member:
TheMarco
at: 02:26 AM 07/03/2009
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?
with the palm-inspector that's included with the sdk. The setup of palm-inspector appears to be a bit of a dark-art.
Homebrew Developer:
edektor
at: 02:42 AM 07/03/2009
Originally Posted by TheMarco:
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?
Yeah there is something inlcuded with the SDK called the Palm-Inspector but everytime I try and open it it crashes... Also if you ssh into the emulator or the phone and type log <"com.yourname.yourappname"> i.e. log "com.palm.bluetooth" it will show a log of that application.. But I have noticed that it doesn't log everything... Has anybody got the inspector working?
Member:
TheMarco
at: 02:45 AM 07/03/2009
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?
Homebrew Developer:
edektor
at: 02:49 AM 07/03/2009
Originally Posted by TheMarco:
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?
type "log com.palm.bluetooth"
Member:
TheMarco
at: 03:01 AM 07/03/2009
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?
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.
Member:
Blubble
at: 03:20 AM 07/03/2009
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.
Originally Posted by rboatright:
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.
Thanks! Finally got the inspector to work.
Member:
TheMarco
at: 12:22 PM 07/03/2009
Thanks a lot guys! This is really helpful. I can now at least get messages to be spit out to the log so I can sort of see what I'm doing
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.
Member:
Blubble
at: 06:10 PM 07/04/2009
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.
Member:
mdmogren
at: 06:49 PM 07/04/2009
Originally Posted by Blubble:
...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.
?? Um, yes it does... I use it everyday.
Member:
Blubble
at: 07:43 PM 07/04/2009
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.
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.
webOS Nation Forums
> webOS apps and software
> webOS development
>
How the hell do you guys debug?