Debugging in R using wrapper functions to capture function arguments. R Markdown rendered example: Ex1.html R Markdown input: Ex1.Rmd Video lecture: https://youtu.be/-P9UzQuJSH8 This document and all example code: http://winvector.github.io/Debugging/ Blog announcement (good place for questions and comments): http://www.win-vector.com/blog/2016/04/free-data-science-video-lecture-debugging-in-r/ Improved versions of the debug functions are now part of the development version of the replyr package: https://github.com/WinVector/replyr .