weissi / swift-backtrace

💥 Backtraces for Swift on Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

About

💥 Backtraces for Swift on Linux

License:Apache License 2.0


Languages

Language:C 90.5%Language:Swift 3.6%Language:Shell 3.1%Language:Ruby 2.3%Language:Dockerfile 0.5%