Skip to content

Latest commit

 

History

History
68 lines (44 loc) · 2.02 KB

domain-specific-debuggers.md

File metadata and controls

68 lines (44 loc) · 2.02 KB
status
research (please don't share)

Domain-specific debuggers

Motivation

  • General purpose debuggers such as gdb are underused

  • Theory: people who use general purpose debuggers also care about memory layout, e.g.:

    • John Carmack on using debuggers and his old .plan (1998);

    • Martin Thompson also says "step through your code using a debugger".

  • Possible fix: domain-specific debuggers, that focus on displaying your application state at the level of abstraction that you think of it, rather than how the programming language that you are using happens to lay it out in memory

Idea

  • Assumptions: determinism, state machine
  • Record inputs (and states) in circular buffer, dump to disk/SQLite db on error

Examples

Distributed systems

Games

Optimisations

  • Avoid storing the state in the trace (if deterministic)
  • Avoiding infinite traces via state snapshots
  • Turn off logging (if deterministic)
  • Audit trails

Contributing

  • General purpose formats for states, inputs and outputs against which generic debuggers can be written against? Structured JSON? Binary?

See also