Debugging methods in R6 classes is somewhat different from debugging normal R functions.
RStudio breakpoints don’t work in R6 class methods. The simplest way to debug code is to insert a
browser() line where you want to open a debugging console, reload the classes, and then step through your code. But this involves modifying your code, reloading it, and re-instantiating any objects you want to test.
To disable debugging for future instances, use the generator’s
undebug() to disable debugging on an object’s method.
You can also use the
trace() function to specify where in a method you want to drop into the debugging console.