02-28-2011 04:05 PM
Aloha, I was going to make this apart of my overall writeup for jQuery mobile / jQuery on the BlackBerry Tablet but since I've seen some posts about "how can I debug within the tablet", I thought I'd get this part out sooner.
Step 1:
add the following to your config.xml
<access subdomains="true" uri="https://getfirebug.com"/>
Step 2:
Add the following to your index.html or whatever you have set as your main html file.
<script src="https://getfirebug.com/firebug-lite.js"> { startInNewWindow: false, startOpened: true, enableTrace: true } </script>
Step 3:
In your javascript code use console.log(); to dump data to the console, you can also see when errors loading scripts show up. this will also show you xhr data and the like in the net tab.
some other things you can do with this tool:
instead of loading in new code, zipping, creating package and uploading use the javascript console to pull data from local:/// or a remote server directly into your application.
you can refresh your application by running window.location.reload(); instead of closing the application.
you can test uncertain functionality with the api before writing a ton of code beforehand.
you can dump localStorage to make sure data is being stored correctly.
These are a few things you can do with this tool, but overall it can be very useful for debugging your application directly on the tablet vm.

03-01-2011 02:01 PM
Awesome tips Levi! Thanks for sharing with the community
03-02-2011 03:22 PM
Of course not a problem ![]()
I have also been seeing some questions about jQuery and jQuery Mobile, specifically jQuery 1.5.1 update, there was a patch pushed through to fix the bug with local:/// and response 0 but from what i've heard 1.5.1 isnt working.
If anyone wants to use the above debugging method and post the results here that would be great in helping me get a solution to the issue so 1.5.1 can be used.
03-21-2011 02:52 AM
I have tried this and I can see the firebug debugger at the bottom, I can also choose the javascript that I want from the scripts - but I am not able to see the contents of the script at the bottom pane, to be able to add debug statement.
When I access the same from the desktop browser, firebug displays the contents of the script as expected. However, I am unable to set the debug breakpoint even in the desktop browser.
Is there anything else I need to do to be able to set debug points? (For PlayBook I have added the access permission in config.xml).
Thanks!
03-21-2011 10:46 AM
JavaScript breakpoints and debugging will not be able to work in this toolkit. This must be built directly into the browser.