Swiftpack.co -  swift-server/swift-backtrace as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
swift-server/swift-backtrace
💥 Backtraces for Swift on Linux and Windows
.package(url: "https://github.com/swift-server/swift-backtrace.git", from: "1.3.1")

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:

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 for details on the security process.

Acknowledgements

Ian Partridge (GitHub, Twitter) the original author of this package.

Johannes Weiss (GitHub, Twitter) for the signal handling code.

Saleem Abdulrasool (GitHub, Twitter) for the Windows port.

GitHub

link
Stars: 236
Last commit: 5 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

SwiftBacktrace 1.3.1
1 week ago

SemVer Patch

Add missing new method for Windows/macOS.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API