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
Contributor
joegreen690
Posts: 17
Registered: ‎03-10-2014
My Device: Z10
My Carrier: Bell
Accepted Solution

Where are the error messages

Hi,

 

I hope I'll get some answers. I'm not a big fan of BB from my personal experience with Playbook and customer service.  Since my organization uses BB's, I'm here asking questions.

 

I'm running and modifying the WebWorks Samples. I'm installing them on BB 10 device and testing. I've enabled WebInspector but when the application doesn't work, I'm expecting to see some error message but I don't see them. Where and what the console.log. But I don't see this. I'm using the WebWorks web based tool that I downloaded from BB site to biuld the application. I'm not building app using command line.

 

Thanks for you help.

 

Joe Green

 

 

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,533
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Where are the error messages

HI there,

First thing to double-check is that you're building in debug mode but, if you can connect Web Inspector to the device, then that's pretty much covered.

The console.log lines should be outputting to the Console tab within Web Inspector. If they're not outputting, my first hunch would be that they're not being reached in the first place.

With Web Inspector, from the Sources tab, you can actually set breakpoints in your scripts and step through line by line, perhaps that may be the best starting point to double-check that the console lines are actually being reached.

If they are being reached, and no output is being displayed, there are a few things to check:
1) The device model and OS version.
2) The version of Chrome you are using.
3) In the Console tab, if you type 'window' (not including the quotes), does the console actually show information on the window object? (Just as a sanity check to ensure there is communication between the device and inspector.

Hopefully we can improve on past experiences here :-)

Cheers!

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Contributor
joegreen690
Posts: 17
Registered: ‎03-10-2014
My Device: Z10
My Carrier: Bell

Re: Where are the error messages

I'm using BB Z10 and OS ver is 10.2.1.2102. I'm building the app in debug mode, so that I can see errors if any.  I generally click on Build and Install button on Web Works and the target is the device. I'm not using the simulator. 

 

In Web Works interface under the project, I see 3 sections - Configurations, Plugins and Build.  Do I need to select anything specific under Configuration section?

 

When I try to launch the app from the device, I see a pop-up titled "Web Inspector Enabled" and it shows me ip4 and ip6 with OK button. There are no tabs. Don't know where are Console and Sources tab. Once I click on OK, this pop-up window disappears.

 

I don't know where to type window as you suggested.

 

I also don't know what is chrome? Is it the browser used by BB. How do I check it's version?

 

Thanks Orso, hope to hear from you.

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,533
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Where are the error messages

Ah, yes you'll want to install Google Chrome on your PC:

https://www.google.com/intl/en/chrome/browser/

 

Once installed, your PC will need to be on the same (WiFi) network as your device, and on your PC, in the browser address bar, you will type the IP:smileytongue:ORT combination that the device announces on startup. This will allow you to connect Web Inspector from your desktop PC to your device, and there you will see the debugging consoles and additional panels to help investigate issues.

 

In short, you're connecting your PC (via Google Chrome) to your device to debug.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Contributor
joegreen690
Posts: 17
Registered: ‎03-10-2014
My Device: Z10
My Carrier: Bell

Re: Where are the error messages

Ok, I'll try this from some other laptop because my current desktop is conned to network by hardwire and doesn't have WiFi capability.

 

My device is connected to my desktop PC. Is there a way to do debugging in this scenario?

 

When I enter the IP and port in the Chrome on PC, I see a page called BlackBerry Web Inspector and below it are 3 things listed:

WebWorks For BB10 Bootstrap

Untitled

Overlay WebView

 

Not sure what these are?

 

 

 

 

Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,533
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Where are the error messages

That's the one, as long as it's the same network it is fine, which it appears to be. You didn't set a <title> in your index.html, so it is coming up as Untitled. If you click on that link, you should get hte Web Inspector for your app. The other two are specific to the platform and you don't really need to go into those.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Contributor
joegreen690
Posts: 17
Registered: ‎03-10-2014
My Device: Z10
My Carrier: Bell

Re: Where are the error messages

Thank you Oros for your help. Got it.

Please use plain text.