RACBacktrace Class Reference
| Inherits from | NSObject |
| Declared in | RACBacktrace.h RACBacktrace.m |
Overview
Preserves backtraces across asynchronous calls.
On OS X, you can enable the automatic capturing of asynchronous backtraces
(in Debug builds) by setting the DYLD_INSERT_LIBRARIES environment variable
to @executable_path/../Frameworks/ReactiveCocoa.framework/ReactiveCocoa in
your scheme’s Run action settings.
On iOS, your project and RAC will automatically use the rac_ GCD functions
(declared above) for asynchronous work. Unfortunately, unlike OS X, it’s
impossible to capture backtraces inside NSOperationQueue or other code
outside of your project.
Once backtraces are being captured, you can po [[RACBacktrace backtrace]](#//api/name/backtrace) in
the debugger to print them out at any time. You can even set up an alias in
~/.lldbinit to do so:
command alias racbt po [RACBacktrace backtrace]
Tasks
-
previousThreadBacktraceproperty -
callStackSymbolsproperty -
+ backtrace -
+ backtraceIgnoringFrames:
Properties
callStackSymbols
The call stack of this backtrace’s thread.
@property (nonatomic, copy, readonly) NSArray *callStackSymbolsDeclared In
RACBacktrace.hpreviousThreadBacktrace
The backtrace from any previous thread.
@property (nonatomic, strong, readonly) RACBacktrace *previousThreadBacktraceDeclared In
RACBacktrace.hClass Methods
backtrace
Captures the current thread’s backtrace, appending it to any backtrace from a previous thread.
+ (instancetype)backtraceDeclared In
RACBacktrace.hbacktraceIgnoringFrames:
Same as backtrace, but omits the specified number of frames at the top of the stack (in addition to this method itself).
+ (instancetype)backtraceIgnoringFrames:(NSUInteger)ignoreCountDeclared In
RACBacktrace.h