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

Native Development

Reply
j_h
Contributor
j_h
Posts: 12
Registered: ‎08-21-2012
My Device: .

Debugging/Instrumentation - A general question.

This is more of a general question as to how people are doing their debugging. Is there a way to view device logs? I feel like i might be missing something easy, but coming from BB7 days i dont have like a

 

"javaloader eventlog" to diagnose things such as connections. I've also read about isntrumentation capabilities but i dont see how i could access this. I see pinutils.so but i feel as though i can access it to do some runtime analysis.

 

I also dont see see gdb on the device when I blackberry-connect/ssh in. I feel the debugger in QDE is highly unreliable and drops all the time and just cumbersome to use.

 

So what have you guys been doing to debug? Print lines? QDE? Am i missing something obvious? There isn't a javaloader equivalent for BB10 is there?

Developer
indy2718
Posts: 36
Registered: ‎01-16-2013
My Device: Z10

Re: Debugging/Instrumentation - A general question.

The QNX IDE debugger works well for me.  No crashes or disconnects. Here are some tips:

- Remember the hotkeys for step, step over, step in, continue. 

- Make hotkeys for switching between C++ and debug perspective.

- add: b _assert to your gdbinit.  Use "assert" in your code to find programming errors.  The debugger will break.

- add: catch throw to your gdbinit.  Any exceptions will break on your program.

- add a DEBUG macro to your source code to print to stderr

- get to know the "console" view and all it's icons on the right.  It is switched by either clicking on the process in the Debug view, or by the switch icon. 

The useful consoles are:  app stderr and gdb console.

-Use the "gdb console" for user defined gdb commands.

 

My cycle of debugging is:  ctrl b  to build, F11 to start debug, F8 to continue after breaking in main.  Pause or set breakpoints at any time.

 

 

j_h
Contributor
j_h
Posts: 12
Registered: ‎08-21-2012
My Device: .

Re: Debugging/Instrumentation - A general question.

http://qt-project.org/wiki/Remote_debugging_on_Blackberry_devices

 

This is more what I was looking for...

 

Any way to get slogger logs?

Developer
indy2718
Posts: 36
Registered: ‎01-16-2013
My Device: Z10

Re: Debugging/Instrumentation - A general question.

I don't think we have the correct permissions/group as devuser to access /dev/slog.  (slogger/sloginfo).  I logged in using ssh and checked.

Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook

Re: Debugging/Instrumentation - A general question.