Elm Debugging techniques

  • Debug.todo
  • Frame then fill in
  • Annotation let bindings
  • Using nonsense names as a step
  • Elm review rule to check for nonsense name

Hardcoded values vs debug.todo

  • Todos don't allow you to get feedback by running your code
  • TDD
  • Fake it till you make it
  • Simplest thing that could possibly work
  • Joël Quenneville's article Classical Reasoning and Debugging
  • Debugging is like pruning a tree


  • Take a walk. Step away from the keyboard when you're grinding on a problem
  • (Short, Self Contained, Correct (Compilable), Example)
  • Create a smaller reproduction of the problem
  • Reduce the variables, you reduce the noise and get more useful feedback
  • Reasoning by analogy from Joël's post
  • Elm debug log browser extension
  • node --inspect
  • elm-test-rs

Debug.log in unit tests