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://github.com/metacraft-labs/codetracer?tab=readme-ov-file#introduction">https://github.com/metacraft-labs/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://www.youtube.com/watch?v=xZsJ55JVqmU" rel="nofollow">https://www.youtube.com/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'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/C++, Rust, Nim, D, Zig, Go, Fortran and FreePascal.
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's need for the vast majority of users.<p>Ah well, it didn't happen. So now we all rebuild code 'debug' 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.
The Noir support makes sense given its use in ZK proofs where execution tracing is particularly valuable, but I'm really looking forward to the Python and Ruby implementations. Those languages' dynamic nature makes bugs particularly elusive sometimes.<p>Has anyone here tried using this with Noir yet? I'm curious about the performance overhead of the tracing mechanism, especially for longer-running programs. Also wondering if there are plans to support JavaScript/TypeScript for web development use cases.
If you are using Clojure or ClojureScript check out FlowStorm:<p><a href="https://www.flow-storm.org/" rel="nofollow">https://www.flow-storm.org/</a>
Noir is a Domain Specific Language for SNARK proving systems.
<a href="https://noir-lang.org/" rel="nofollow">https://noir-lang.org/</a>
Looks really cool, but in production systems, won't the trace files proliferate at extreme speed? How would you correlate the files to a certain session for user identification for example?
I love it, I always wished for something like that. Will try to later test with python. Wish there was also for JS/TS. As for rr debugger did it got by now any support for MacOS or Windows or Android? I'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
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.
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 :/
Hi alehander42<p>I'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 ./binary1.exe input.txt ./binary2 input.txt and record their execution with your tool<p>And now, I'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 << n << std::endl
n += 15;
if (n > 22)
{
n--;
}
return n + 1;
</code></pre>
}<p>int main(int argc, char* argv) {<p><pre><code> auto result = test(argv[1]);
std::cout << result << std::endl
</code></pre>
}<p>Visited Function: main with arguments (argc: 2, argv ["path", 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 > 22):<p>N set to 22<p>Exit If (n > 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 / recording data format?
Congrats on the release! Looks like you have done a great job so far. Doesn'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!
For frontend there is <a href="https://www.replay.io/" rel="nofollow">https://www.replay.io/</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 :(
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/or execution of multiple processes? How does it handle shared memory regions that may be modified outside of the recording?