back

by wiradikusuma·4y ago·view on hn ↗
Help me understand time travel debugging. If the code has side effect and/or depend on external dependencies, how does it work? E.g. A cron that parses CSV, move the file to folder Done, and generate PDF and email it.
1 comments
For our approach, it's effectively a sort of virtualization.

At recording time we're collecting info about all the program's interactions with the outside world. In replay we prevent it from actually running any operations and instead just reinject what happened last time.

So if you had a program that did some IO and compute then we've have recorded all the system calls it did. When it's reading CSV data in replay we're feeding in the came data it read before. When it's doing things without outside effects we just say "sure, you've done that" and give it the original return code back.

That makes sense. Thank you!