New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rust-gdb - easy way to run rust-scripts with gdb #54
Comments
rust-gdb $(rust-script --debug -o ./my_rust_script.rs --version 2>&1 | rg -w '.+Running `(.+) --version`' -r '$1') |
I guess this covers most of my question! |
This no longer seems to work (BTW old |
@joseluis Nowadays rust-script runs the executable directly on subsequent runs for speed (to avoid the small overhead of running cargo, instead of the binary directly. You can run rust-gdb $(rust-script --debug -f -c ./my_rust_script.rs --version 2>&1 | rg -w '.+Running `(.+) --version`' -r '$1') Does that work for you? Still probably makes sense to make this easier. |
The first time the script is run (or after calling
afterwards subsequent invocations show even less:
|
This can be used to run e.g. rust-gdb (#54) or hyperfine. Examples:
This can be used to run e.g. rust-gdb (#54) or hyperfine. Examples:
This can be used to run e.g. rust-gdb (#54) or hyperfine. Examples:
This can be used to run e.g. rust-gdb (#54) or hyperfine. Examples:
This can be used to run e.g. rust-gdb (#54) or hyperfine. Examples:
@joseluis The just released 0.31.0 version now suports a rust-script --debug --wrapper rust-gdb my-script.rs Does that work as expected for you? |
Works wonderfully! thank you @fornwall |
rust-gdb -
Could you please add some feature to make it easy to run rust-scripts with
gdb
?I've found flag
--debug
to build in debug mode. However it : 1. also runs script and 2. still I need to sk cache directory looking for path to debug build binary.What about flag (maybe with shorter name)
--build-only-and-return-absolute-path-to-binary
?That way I could run
rust-gdb "$(rust-script --debug --build-only-and-return-absolute-path-to-binary my_script.rs)"
to comfortably run script in debugger ?The text was updated successfully, but these errors were encountered: