Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Visitor
Codemonkey
Posts: 1
Registered: ‎09-25-2012
My Device: various

BrowserFieldDebugger broken in API 6 and 7??

I am trying to debug a hybrid application consisting of a Java shell with a BrowserField which retrieves and displays (or should display) a Web page consisting of HTML, CSS & JavaScript

* I extended the net.rim.device.api.browser.field2.debug.BrowserFieldDebugger abstract class (http://www.blackberry.com/developers/docs/6.0.0api/index.html) with a full set of public methods, each of which simply writes a line of text to the console.

* I can instantiate this class and see the console output from the constructor

* I make a test call to one of the methods of my BrowserFieldDebugger object and see the console output, no problem.

* I can successfully call the setDebugger() method of my BrowserField object, passing a reference to my BrowserFieldDebugger instance.  (Of course the return type for this method is void and it does not declare any thrown exceptions)

 

- If I then call the getDebugger() method of the BrowserField object, it returns null .. yes, null.  Uh, excuse me, I just set the debugger...

 

* I can verify that my BrowserFieldDebugger object still exists, the BrowserField just doesn't know about it.

 

- I never see any further output from my BrowserFieldDebugger object.  (Which appears to confirm the failure to attach to the BrowserField)

 

This is the same for API 6 and API 7 (where I note that BrowserFieldDebugger is marked as deprecated).

Am I missing something?  Is there some un-documented flag to set?  Should I pull a bunny rabbit out of a hat?

Or is this API just FUBAR?

:Dots:

BlackBerry Development Advisor
cdelcol
Posts: 37
Registered: ‎01-08-2010
My Device: Various

Re: BrowserFieldDebugger broken in API 6 and 7??

This question belongs in the Java forum, not web. But here is something you might try:

Webworks uses BrowserField as part of the framework. The api supports enabling JS debugging using WebInspector. Try tackling the problem from that route instead. You can find documentation on how to use it from your desktop as part of the WebWorks documentation. I believe it is just a matter of enabling it in the Java api.