Crates.io | gdb_probe |
lib.rs | gdb_probe |
version | 0.1.2 |
source | src |
created_at | 2019-02-06 10:59:46.0245 |
updated_at | 2019-02-06 11:03:17.918225 |
description | ipdb.set_trace() / binding.pry, but for rust |
homepage | |
repository | https://github.com/eqv/gdb_probe.rs |
max_upload_size | |
id | 113060 |
size | 3,131 |
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.
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.
}
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.