TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Rust, RR, Neovim: A perfect debug combination

159 pointsby zteppenwolfabout 2 years ago

12 comments

DixieDevabout 2 years ago
Anyone got other useful tools for debugging within (neo)vim? Just seamlessly putting down breakpoints, stepping through code execution, and getting a fully fledged debugging UI experience (a la Visual Studio or Remedy BG)? This is possibly the only thing I miss from developing on Windows, and it&#x27;s a shame!<p>EDIT: I specified &#x27;within vim&#x27; but actually I&#x27;d be down for standalone Linux app recommendations too.
评论 #35524605 未加载
评论 #35523479 未加载
评论 #35523582 未加载
评论 #35531662 未加载
评论 #35524102 未加载
评论 #35523301 未加载
评论 #35523599 未加载
评论 #35524052 未加载
评论 #35524417 未加载
评论 #35525105 未加载
评论 #35523970 未加载
评论 #35523393 未加载
评论 #35525737 未加载
JestUMabout 2 years ago
Investing in a good debugging tool and knowing your way around using it well, makes all the difference.
评论 #35523315 未加载
评论 #35523277 未加载
评论 #35524038 未加载
nu11ptrabout 2 years ago
I personally have never used a debugger in Rust. Logging and printing has typically been enough.<p>For those use cases where it is tough to see the output (tests, windows services, etc.) I wrote the `rdbg` set of crates. It is essentially identical to `dbg!` and `println!` macros, but delivers messages via a TCP socket to a simple command-line viewer (which can be on the same machine or remote). The design is such that it can be enabled and used the first time within a minute or two for &quot;quick and dirty debugging&quot;. It can just as quickly be removed or turned into a no-op with a Rust feature.<p>Dependency: <a href="https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;rdbg" rel="nofollow">https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;rdbg</a><p>Viewer: <a href="https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;rdbg-view" rel="nofollow">https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;rdbg-view</a><p>EDIT: Apparently I need to update the README as I added the &#x27;msgf&#x27; and &#x27;valsf&#x27; macros that include auto-flush which is handy for short running programs where explicit flush doesn&#x27;t work due to failing program&#x2F;etc.
评论 #35526671 未加载
fcouryabout 2 years ago
I have written an extension for VSCode that replicates the repeat last test feature and lets you run the test under the cursor.<p><a href="https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=fcoury.runst" rel="nofollow">https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=fcoury.r...</a>
thegeomasterabout 2 years ago
Only if you&#x27;re debugging tests.<p>Unfortunately using rr to debug a bigger application with lots of RAM access is not feasible.
评论 #35523198 未加载
评论 #35523941 未加载
colesantiagoabout 2 years ago
Can someone explain what I am looking at here with this? Genuine question.
评论 #35523072 未加载
baqabout 2 years ago
rr is basically black magic
评论 #35523143 未加载
RcouF1uZ4gsCabout 2 years ago
Does this setup have nice visualizations of data structures? Can it show a Vec as a list of values or a HashMap as a list of (key,value)?
评论 #35525137 未加载
评论 #35528864 未加载
Aiedailabout 2 years ago
Is there a similar tool for python? I don&#x27;t like the DAP solution but prefer a gdb like python debugger :(
n8henrieabout 2 years ago
I hadn&#x27;t realized there were alternatives to rust-lldb for debugging rust. I have some reading to do.
sp0ckabout 2 years ago
Funny thing is that thanks to rust compiler I never had a need to debug my code :-)
评论 #35523534 未加载
评论 #35523303 未加载
评论 #35523601 未加载
favadiabout 2 years ago
rr is pure magic! I wish that it is available on macOS.
评论 #35524298 未加载