03-14-2013 03:12 PM
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?
03-15-2013 01:02 AM
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.