Swiftpack.co - Package - swift-server/swift-backtrace

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

swift-server/swift-backtrace

💥 Backtraces for Swift on Linux

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, make sure you build your application with debug symbols enabled:

$ swift build -c release -Xswiftc -g

When your app crashes, a stacktrace will be printed to stderr.

Acknowledgements

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

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

Github

link
Stars: 199
Last commit: 15 weeks ago

Releases

1.2.0 - 2020-03-27T18:05:20

  • add deprecation warning on Backtrace.print()