# swift-backtrace **Repository Path**: RandyWei/swift-backtrace ## Basic Information - **Project Name**: swift-backtrace - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-20 - **Last Updated**: 2021-07-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Backtrace This Swift package provides support for automatically printing crash backtraces of Swift programs. ## Usage Add `https://github.com/swift-server/swift-backtrace.git` as a dependency in your `Package.swift`. ### Crash backtraces In your `main.swift`, do: ```swift import Backtrace // Do this first Backtrace.install() ``` Finally, for Swift < 5.2, make sure you build your application with debug symbols enabled. Debug symbols are automatically included for Swift 5.2 and above. ``` $ swift build -c release -Xswiftc -g ``` When your app crashes, a stacktrace will be printed to `stderr`. ## Security Please see [SECURITY.md](SECURITY.md) for details on the security process. ## Acknowledgements Ian Partridge ([GitHub](https://github.com/ianpartridge/), [Twitter](https://twitter.com/alfa)) the original author of this package. Johannes Weiss ([GitHub](https://github.com/weissi), [Twitter](https://twitter.com/johannesweiss)) for the signal handling code. Saleem Abdulrasool ([GitHub](https://github.com/compnerd), [Twitter](https://twitter.com/compnerd)) for the Windows port.