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
arnoldc
Posts: 35
Registered: ‎08-29-2012
My Device: Blackberry 10 Alpha Device
My Carrier: None
Accepted Solution

Is it possible to catch all start up console.log messages on real device using web inspector?

I am trying to debug initiaization stage on a real device.  The problem is that I won't be able to establish a remote debug session until the app is running.  And by that time, I miss any console message I may have put in my initialization codes. Is there any technique to catch all console messages?

Please use plain text.
BlackBerry Development Advisor
bryanhiggins
Posts: 201
Registered: ‎12-18-2012
My Device: Z10, Q10, Q5, Z30, Z3
My Carrier: Bell

Re: Is it possible to catch all start up console.log messages on real device using web inspector?

window.location.reload() should do the trick

Bryan Higgins
BlackBerry WebWorks
@bryanhiggins
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Is it possible to catch all start up console.log messages on real device using web inspector?

In Web Inspector, you can also press CTRL + r to trigger a reload.


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
arnoldc
Posts: 35
Registered: ‎08-29-2012
My Device: Blackberry 10 Alpha Device
My Carrier: None

Re: Is it possible to catch all start up console.log messages on real device using web inspector?

This works for me! It is actually command + r, on OS-X anyway.

Please use plain text.
Developer
peardox
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Is it possible to catch all start up console.log messages on real device using web inspector?

If you want to debug on the fly can I suggest you look up window.onerror

 

Its not perfect but allows you an extra level of control when debugging your app

 

Stick a handler in for this one, throw the output to some div you can see and you can see exactly whats happening

 

It misses some errors but for basic JS debug is very nice to have on your toolbelt




Click the like button if you find my posts useful!
Please use plain text.