Closed duccioa closed 3 years ago
With a bit of extra testing I eventually realised that this has nothing to do with R6 and it is not a bug.
It's a feature of browser()
, that lets you uses some commands at the browser prompt. One of these is s
, that by chance is also a variable that I am using a lot...
When I try to debug a class with
MyR6Class$debug("initialize")
or withbrowser()
inside the code, the debugger enters a sort of recursive mode where it steps into every single function that is called. So for example, if the$initialize()
function contains a line withis.character(x)
, the debugger would debug also the functionis.character
. This behaviour is a bit erratic and so far I haven't been able to understand when this issues comes up and I am not able to provide a reproducible example. I did some research but I could not find anything relevant,so I am posting here in case someone has bumped into the same issue. I am working with RStudio Version 1.4.999. This is my system info:A bit more information about the context. I have a package A with R6 classes and a second package B with classes that inherit from classes in A. This is the situation when the issues arises most often, I think.
Thank you