Live data from Hacker News

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

github.com

31–40 of 59 posts

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

#32

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?

We are currently working on two "backends" where recording works in different ways.

For the scripting languages and smart contract/ZK languages, we instrument the interpreters using high level hooking API-s or direct patches, and we produce a trace.

For system languages, we directly build on top of RR[1] recordings for now: RR can record multiple processes, and it works in userland. IIRC it doesn't support modifications of shared memory outside of the recording. It's very well documented in their paper: Engineering Record And Replay For Deployability: Extended Technical Report[2].

1: https://rr-project.org/

2: https://arxiv.org/abs/1705.05937

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

#33
post #24
post #19

Earlier quoted context omitted.

The planned RR recordings integration is what I'm most excited about though. Having this capability for systems languages like Rust and C++ would be transformative for complex debugging scenarios where you're often forced to restart debugging sessions from scratch after stepping past a crucial point.

This happens all the time and is super irksome. Being able to step backwards as well as forwards is super cool. Also, being able to do that with a loop using a slider is cool.

I need a VSCode extension for this. But alas, it's just sitting in their roadmap... Typical. Guess I'll have to roll up my sleeves and build one myself. Not like I have enough on my plate already. At least their trace files are in an open format, so it shouldn't be impossible to hook into the VS Code debugging API.

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

#34
post #33
post #24

Earlier quoted context omitted.

This happens all the time and is super irksome. Being able to step backwards as well as forwards is super cool. Also, being able to do that with a loop using a slider is cool.

I need a VSCode extension for this. But alas, it's just sitting in their roadmap... Typical. Guess I'll have to roll up my sleeves and build one myself. Not like I have enough on my plate already. At least their trace files are in an open format, so it shouldn't be impossible to hook into the VS Code debugging API.

We'd love additional contributors! We also have some more detailed plans for such an extension. If you're interested in chatting about it, you can join our discord[1] (or we can expand here/in a github issue as well)

1: https://discord.com/invite/aH5WTMnKHT

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

#37
post #15

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?

Especially since the trace files are in .json. [0] [0] https://github.com/metacraft-labs/runtime_tracing#format

True! The next major version of the format should use a more optimized format, as mentioned.

However, some of the important optimizations, that we're preparing are not related so much to the format, but to record more specific things and reconstruct more in the postprocessing.

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

#39
post #26

Thank you for building up the nim ecosystem.

came here to say the same. the big problem with nim is not enough people use it. and the way to fix it is with more people using it. (classic catch-22). i struggle with this myself, i might be hiring soon and i know it's going to be hard to find nim programmers. current plan is to recruit python and js developers who wouldn't mind also coding in nim when we'd otherwise need to drop down to the c/c++ layer to integrate with some low-level library for speed/efficiency.

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

#40
post #25

Any chance of something like this being available for Java/Kotlin on JVM?

https://github.com/cmu-pasta/fray

Fray is a controlled concurrency testing tool for the JVM that supports record and replay. It could be a perfect backend for codetracer. (I'm the author of Fray)

Post reply on HN