Ad
How Do You Print Out A Stack Trace To The Console/log In Cocoa?
I'd like to log the call trace during certain points, like failed assertions, or uncaught exceptions.
Ad
Answer
This code works on any thread:
NSLog(@"%@", NSThread.callStackSymbols);
Returns an array containing the call stack symbols. Each element is an
NSString
object with a value in a format determined by thebacktrace_symbols()
function.
Ad
source: stackoverflow.com
Related Questions
- → Shopify iOS SDK - issue converting BuyProductVariant to BuyProduct
- → BigCommerce and shopify API
- → How to print the cart items,remove cart items in shopify ios sdk?
- → How to keep the user logged in or check if the user is logged in or not in Shopify?
- → How to covert a custom class into json array or json dictionary in objective c?
- → React Native Debug iOS Component in XCode
- → Error tokenizing data. C error: EOF following escape character
- → data type understanding of Parse database
- → How to save the response From My server , and How can i access That data
- → Bulk creation of components in React Native
- → How to mute AVAudioPlayer if music from another app is playing in spritekit
- → Swift Array memory address changes when referring to the same variable
- → String encryption in Objective-C decrypt in C#
Ad