Currently having trouble debugging with XCode. All stack traces only show last two calls made. Can't use lldb
console too. For example a simple unrecognized selector
error only shows this trace log
* thread #1: tid = 0x2503, 0x32d2e960 libobjc.A.dylib`objc_exception_throw, stop reason = breakpoint 1.1
frame #0: 0x32d2e960 libobjc.A.dylib`objc_exception_throw
frame #1: 0x37c4ae06 CoreFoundation`-[NSObject(NSObject) doesNotRecognizeSelector:] + 170
The first line in the call stack represents the last executed function call, so remember to always read a stack trace top-down.
lldb is the default debugger in Xcode on macOS and supports debugging C, Objective-C and C++ on the desktop and iOS devices and simulator. All of the code in the LLDB project is available under the Apache 2.0 License with LLVM exceptions.
In lldb you can set breakpoints by typing either break or b followed by information on where you want the program to pause. After the b command, you can put either: a function name (e.g., b my_subroutine ) a line number (e.g., b 12 )
Try printing [NSThread callStackSymbols]
from the debugger, which sometimes works when the debugger doesn't. It doesn't really surprise me that
Additionally, my experience is that GDB is far more reliable.
A simple XCode restart solved the problem. But this bug keep happening after a while later. I'll report a bug about this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With