Tip
You can place the downloaded app in a location of your choosing (e.g., the Applications
folder on macOS or ~/.local/share/applications
on Linux).
When you launch CodeTracer for the first time, it will prompt you to complete the remaining installation steps, such as adding the command-line utilities to your PATH.
Caution
Upon the first launch, macOS users will see the error message “CodeTracer is damaged and can’t be opened”. To resolve this problem, please execute the command xattr -c
. We expect this inconvenience will be remedied soon through our enrollment in the Apple Developer program that will ensure CodeTracer is properly signed and whitelisted by Apple. See https://discussions.apple.com/thread/253714860?sortBy=rank for more details.
CodeTracer is a user-friendly time-traveling debugger designed to support a wide range of programming languages.
It 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:
Compared to traditional debuggers, CodeTracer gives you two major superpowers:
-
Once you capture a bug in a recording, consider it squashed!
Bugs that are hard to reproduce can be painful to fix — you’ve surely been there. Once such a bug is captured with CodeTracer, you’ll rarely need more than 30 minutes to track it down! This is largely a consequence of the next superpower:
-
Most bugs are easily revealed when you know the origin of any value in the program.
All programs produce output. Some examples are bytes generated as a response to a web request, pixels being drawn on your screen or perhaps a simple log line written to the terminal.
When CodeTracer creates a recording, it captures a user-extensible set of output events relevant to the program. The GUI displays these events in a searchable chronological event log.
Consider a misbehaving program that prints unexpected output to a log file midway through its execution. Clicking on the specific output event in CodeTracer will take you to the precise moment and code line where it was generated.
The unexpected value must be originating from some variable that’s being passed to the logging function. With CodeTracer, you can now ask the question “Where did this value come from?”. CodeTracer will find another moment in the execution, potentially multiple seconds earlier, in a completely different part of the program where this particular memory location was last written to.
This could be memory corruption or a genuine logical error. Either way, CodeTracer will report the origin. Let’s say that you end up in the correct function that is responsible for computing the problematic value, but another input there leads to the issue. You can continue the search by repeating the question “Where did this input come from”? It usually takes just a few of these jumps to earlier moments in time to arrive at the root cause for the bug.
Every time you jump to a new moment in the execution, you can fearlessly explore your surroundings by stepping forward or backwards, having access to a back button that can always get you to any previous point of interest. At every point of the journey, our novel UI shows you details about the past and future program states at a glance and you know your position in the precisely recorded call trace of the program.
These features combined, make for a truly powerful debugging experience.
The initial release of CodeTracer supports the Noir programming language. It has been developed in collaboration with the Blocksense team and currently requires the use of the Blocksense Noir Compiler, which is included in the CodeTracer distribution.
CodeTracer’s open-source development is made possible by the generous support of Aztec Network, Arbitrum Foundation, and Aptos Foundation. During 2025, CodeTracer will evolve into a comprehensive Web3 development toolkit by gaining support for many additional smart contract and zero-knowledge programming languages. Most of its functionality will be packaged into reusable libraries that will power the creation of block explorers with advanced transaction tracing capabilities and omniscient debugging plugins for Visual Studio Code and other IDEs.
CodeTracer uses an open format for its trace files and we’ve started several community-driven projects which aim to add support for other programming languages:
Metacraft Labs is 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.
To shape our priorities and to help us understand the demographics of our user base better, please fill out CodeTracer Developer Preferences Survey.
To accelerate our development, please consider donating to our Open Collective campaign. Anyone who contributes more than €50 before June 2025 will get early access to our beta releases for system programming languages, forever.
Once you have time travel, you can re-imagine how a debugger works from the ground up! Here are some of the features of CodeTracer that set it apart from traditional debuggers:
When CodeTracer breaks at a certain line of code, it knows not only the past but also the future. You can immediately see the values of all variables in the current function right next to the source code. This includes variables in loops where you can easily scroll through the iterations. Taken code branches are highlighted, while the non-executed code is immediately grayed out.
Many developers tend to transition from using interactive debugging early on in their careers, to mostly relying on carefully placed print statements as they start to face harder problems in distributed and real-time systems.
CodeTracer gives you the best of both worlds. A tracepoint allows you to see the effects of adding additional code to your program, without recompiling and rerecording it.
The added code can feature if statements, additional function calls and various
17 Comments
sizediterable
[flagged]
kingforaday
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!
rubenvanwyk
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?
optymizer
Is there anything out there for Android?
pzo
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.
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.
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
muizelaar
How does the implementation compare to RR?
dloss
Noir is a Domain Specific Language for SNARK proving systems.
https://noir-lang.org/
fdasdffda
[flagged]
dinnertime
Congrats on your release!
One question I have is, how exactly does it record and what are the boundaries of the recording?
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?
cxie
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.
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.
slifin
If you are using Clojure or ClojureScript check out FlowStorm:
https://www.flow-storm.org/
elcritch
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.
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 :/
forrestthewoods
Windows support? What languages? How does it work?
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.
Alifatisk
Even support for D? Wow they thought of everything
Apofis
Any chance of something like this being available for Java/Kotlin on JVM?
esafak
Thank you for building up the nim ecosystem.
jedisct1
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.