Results 1 to 15 of 15
  1.    #1  
    The book says:

    "So you'll want to use the webOS Emulator with integrated JavaScript debugger and DOM inspector."

    Where is this integrated JSJSJS $debugger$ $and$ $DOM$ $inspector$?

    I can't figure out how to debug. Nothing JSJSJS $related$ $shows$ $up$ $in$ $my$ /$var$/$log$/$messages$ $either$.

    Anyone?
  2. #2  
    with the palm-inspector that's included with the sdk. The setup of palm-inspector appears to be a bit of a dark-art.
  3. #3  
    Quote Originally Posted by TheMarco View Post
    The book says:

    "So you'll want to use the webOS Emulator with integrated JavaScript debugger and DOM inspector."

    Where is this integrated JSJSJS $debugger$ $and$ $DOM$ $inspector$?

    I can't figure out how to debug. Nothing JSJSJS $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?
  4.    #4  
    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?
  5. #5  
    Quote Originally Posted by TheMarco View Post
    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"
  6.    #6  
    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?
  7. #7  
    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.
  8. #8  
    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.
  9. #9  
    Quote Originally Posted by rboatright View Post
    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.
  10.    #10  
    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
  11. #11  
    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.
  12. #12  
    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.
  13. #13  
    Quote Originally Posted by Blubble View Post
    ...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.
  14. #14  
    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.
  15. #15  
    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.

Posting Permissions