gdb_probe 0.1.2

ipdb.set_trace() / binding.pry, but for rust
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 4.42 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 862.15 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • eqv/gdb_probe.rs
    6 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • eqv

gdb_probe

You love ipdb.set_trace() in python or binding.pry in ruby? You are sad that rust doesn't ofer the same comfort? gdb_probe is here to safe the day! With a simple call, it suspends the current process, spawns a new terminal and attaches gdb.

How to use

add "gdb_probe="0.1" to your Cargo.toml

extern crate gdb_probe;
use gdb_probe::gdb_probe;

fn main() {
    println!("Hello, world!");
    let x = 3+4;
    gdb_probe(); //spawns a new terminal (urxvt) with gdb attached at this position.
}

Known Caveats

Warning If the target process dies before the debugger can attach, sometimes init is debugged instead. In that case forcefully terminating the debugger causes a reboot.

Depends on urxvt as a terminal.