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.

Show HN: CodeTracer – A time-traveling debugger implemented in Nim and Rust

334 pointsby alehander423 months ago
Hey!<p>We are presenting CodeTracer - a user-friendly time-traveling debugger designed to support a wide range of programming languages:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;metacraft-labs&#x2F;codetracer?tab=readme-ov-file#introduction">https:&#x2F;&#x2F;github.com&#x2F;metacraft-labs&#x2F;codetracer?tab=readme-ov-f...</a><p>CodeTracer records the execution of a program into a sharable self-contained trace file. You can load the produced trace files in a GUI environment that allows you to move forward and backward through the execution and to examine the history of all memory locations. They say a picture is worth a thousand words — well, a video is even better! Watch the demo below to see CodeTracer in action:<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=xZsJ55JVqmU" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=xZsJ55JVqmU</a><p>The initial release is limited to the Noir programming language, but CodeTracer uses an open format for its trace files and we&#x27;ve started community-driven projects which aim to add support for Ruby and Python.<p>We are also developing an alternative back-end, capable of working with RR recordings, which will make CodeTracer suitable for debugging large-scale programs in a variety of system programming languages such as C&#x2F;C++, Rust, Nim, D, Zig, Go, Fortran and FreePascal.

21 comments

JoeAltmaier3 months ago
Neat!<p>Years and years ago I had the opportunity to give Intel processor designers (the time of the 386!) requests for features.<p>I requested a system tick timer for stamping logs (they did that), bus mask and value registers that triggered a debug interrupt on a match (they did that).<p>And a jump source history. Maybe 10 jumps back. So on a breakpoint you could figure out how you got there. A time travelling debug feature.<p>At this point Intel sold an expensive debug probe for recording the bus, you plugged this insane cable into the processor socket and it actually executed in their external hardware, recording every instruction.<p>My jmp history would have replaced much of that, obviating it&#x27;s need for the vast majority of users.<p>Ah well, it didn&#x27;t happen. So now we all rebuild code &#x27;debug&#x27; so we can add tracing and tracking, disrupting the execution path, changing timing and code size and on and on.<p>I always regretted not getting that.
评论 #43285577 未加载
评论 #43289422 未加载
cxie3 months ago
The Noir support makes sense given its use in ZK proofs where execution tracing is particularly valuable, but I&#x27;m really looking forward to the Python and Ruby implementations. Those languages&#x27; dynamic nature makes bugs particularly elusive sometimes.<p>Has anyone here tried using this with Noir yet? I&#x27;m curious about the performance overhead of the tracing mechanism, especially for longer-running programs. Also wondering if there are plans to support JavaScript&#x2F;TypeScript for web development use cases.
评论 #43281915 未加载
slifin3 months ago
If you are using Clojure or ClojureScript check out FlowStorm:<p><a href="https:&#x2F;&#x2F;www.flow-storm.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.flow-storm.org&#x2F;</a>
评论 #43284393 未加载
评论 #43283175 未加载
dloss3 months ago
Noir is a Domain Specific Language for SNARK proving systems. <a href="https:&#x2F;&#x2F;noir-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;noir-lang.org&#x2F;</a>
评论 #43281466 未加载
评论 #43289533 未加载
throw-the-towel3 months ago
Just out of curiosity, why did you use two languages to write CodeTracer and not just one of them?
评论 #43284781 未加载
rubenvanwyk3 months ago
Looks really cool, but in production systems, won&#x27;t the trace files proliferate at extreme speed? How would you correlate the files to a certain session for user identification for example?
评论 #43281611 未加载
评论 #43281613 未加载
pzo3 months ago
I love it, I always wished for something like that. Will try to later test with python. Wish there was also for JS&#x2F;TS. As for rr debugger did it got by now any support for MacOS or Windows or Android? I&#x27;m also wondering how heavy are those recording for typical apps.<p>This would be also great for LLM to give some context via MCP server or even let LLM pick what variables history wanna see instead of giving full recording file.<p>Also nice would be some recording filtering that you wanna e.g. pick few variables and display history during whole execution maybe with some specific formating and maybe even for some numeric variables or like tensors, images, etc pass to rerun for visual debugging so you can see plot it
评论 #43281406 未加载
评论 #43283958 未加载
评论 #43281662 未加载
forrestthewoods3 months ago
Windows support? What languages? How does it work?<p>I don’t like that the headline is “designed to support multiple languages” but it only actually supports an obscure language I’ve never heard of. Feels like a bait and switch.
评论 #43284901 未加载
esafak3 months ago
Thank you for building up the nim ecosystem.
评论 #43283290 未加载
elcritch3 months ago
Very excited for this! I donated on open collective already. The team is full of talented people. A nice interface to time travel debugging, with Nim support soon nonetheless.<p>Though if it uses rr it won’t be able to run on macOS. Bummer, macOS seems to get harder and debug on. Luckily lima vms make it easy to remote :&#x2F;
tester7563 months ago
Hi alehander42<p>I&#x27;ve been searching for something like this, so my question is<p>I have almost identical program in version 1 and 1.01 and I need to find how their behaviour changed<p>So, I run both of them .&#x2F;binary1.exe input.txt .&#x2F;binary2 input.txt and record their execution with your tool<p>And now, I&#x27;d want to extract such data from your tool:<p>Visited functions and how locals were changing. e.g<p>int test(int n) {<p><pre><code> n++; std::cout &lt;&lt; n &lt;&lt; std::endl n += 15; if (n &gt; 22) { n--; } return n + 1; </code></pre> }<p>int main(int argc, char* argv) {<p><pre><code> auto result = test(argv[1]); std::cout &lt;&lt; result &lt;&lt; std::endl </code></pre> }<p>Visited Function: main with arguments (argc: 2, argv [&quot;path&quot;, 7])<p>Visited Function test with arguments (n: 7)<p>test: N set to 8<p>test: N set to 23<p>test: Entered If (n &gt; 22):<p>N set to 22<p>Exit If (n &gt; 22)<p>test: N set to 23<p>Exit function test<p>Main: result set to 23<p>Exit function main<p>Can I achieve it with your tool &#x2F; recording data format?
muizelaar3 months ago
How does the implementation compare to RR?
评论 #43282416 未加载
kingforaday3 months ago
Congrats on the release! Looks like you have done a great job so far. Doesn&#x27;t fit a need for me at the moment, but I will keep an eye out for the alternative back-end evolution and additional programming language support. Thanks!
profstasiak3 months ago
For frontend there is <a href="https:&#x2F;&#x2F;www.replay.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.replay.io&#x2F;</a><p>I loved debugging with that when I was working on react web app.<p>Wish there was something like this for react native :(
dinnertime3 months ago
Congrats on your release!<p>One question I have is, how exactly does it record and what are the boundaries of the recording?<p>For example does it only record the userland execution of a single process, or does it have broader boundaries like including kernel code and&#x2F;or execution of multiple processes? How does it handle shared memory regions that may be modified outside of the recording?
评论 #43282579 未加载
Apofis3 months ago
Any chance of something like this being available for Java&#x2F;Kotlin on JVM?
评论 #43283936 未加载
评论 #43282498 未加载
jv222223 months ago
Would love this for JavaScript if that was even possible.
Alifatisk3 months ago
Even support for D? Wow they thought of everything
评论 #43282501 未加载
optymizer3 months ago
Is there anything out there for Android?
nextn3 months ago
How does it record?
jedisct13 months ago
Because in an HN title, the language a tool is written in or the kind of music the author listens to matters more than what the tool actually does.
评论 #43285614 未加载