- Help with debugging rust code
- https://www.jetbrains.com/help/clion/debugging-code.html#useful-debugger-shortcuts
- https://blog.jetbrains.com/clion/2019/10/debugging-rust-code-in-clion/
- https://lp.jetbrains.com/debugging-rust-in-clion/
- https://blog.jetbrains.com/rust/2021/10/19/debugging-rust-in-jetbrains-ides-state-of-affairs/
- Change local source code
cargo clean
- build & debug with breakpoints
- Add the dependency normally to
Cargo.toml
- Open one of the
*.rs
source files in crate - Get the full path of the (
Ctrl
+Shift
+C
)- eg.
$HOME/.cargo/registry/src/index.crates.io-6f17d22bba15001f/my-dependency-0.1.2
- eg.
- Update
Cargo.toml
, changeversion
topath
- eg.
opentelemetry-otlp = { path = "/home/myself/.cargo/registry/src/index.crates.io-6f17d22bba15001f/opentelemetry-otlp-0.25.0", features = ["grpc-tonic"] }
- eg.
- Reload project from
Cargo.toml
- Update the source code
- Recompile
- Undo your changes in
Cargo.toml
rm -rf $HOME/.cargo/registry/src/index.crates*
- Rebuild
- TODO