Back to browse
GitHub Repository

Debug breakpoint assertions for Rust

222 starsRust

Unbug 0.5 – Rust runtime debug assertions

by BrainBacon·Apr 23, 2026·2 points·0 comments

AI Analysis

●●SolidNiche GemCozy

The ? operator macro attaching breakpoints to error propagation is genuinely clever.

Strengths
  • debug_fail macro automatically attaches breakpoints to all ? operators in a function
  • Shims ensure zero runtime cost in release builds without conditional compilation
  • 197 stars and active iteration based on previous HN feedback shows real usage
Weaknesses
  • Very niche audience—only matters to Rust devs who debug extensively
  • Similar functionality exists in standard Rust debugging patterns with dbg! macros
Target Audience

Rust developers doing intensive debugging work

Similar To

dbg! · tracing · anyhow

Post Description

I'm back again with many improvements to Unbug!

My previous post here led to the removal of reliance on nightly Rust, so I'm hoping you helpful folks pick apart my new features too!

This new version adds a macro that can insert assertions before failures with the try-operator (?).

I also added experimental support for triggering test failures when assertions are run in test mode.

I'll be giving a talk this evening about Unbug at the Bevy virtual meetup this evening at 19:00 CEST. You can see more details here:

https://rustunit.com/bevy-meetup/bevy-meetup-13/

Similar Projects