Debugging R packages

I know it is possible to debug the R code in an R package when it is installed using R CMD INSTALL from Architect. (I have done it in the past…)
However, it does not seem to work as advertised. I have added the breakpoint, but the debug mode is not triggered. I even tried to source the file, and now the check mark appears, but it is still not triggered.
I know that it should get there, because I get an error a few lines after my breakpoint.

Some extra information on how to use this feature would be greatly appreciated.

I did a bit of digging (thanks Maxim). :slight_smile:

It might be related to the type of function. I want to use it on a function that is not exported. I also tried it on a S3 function for a specific class, that also did not work.
A normal exported function, seems to work fine, since I got a message in the console about tracing a function.

Are there known limitations to the debugging system in this regard?

I can make the debugger work if I enter the following in the R console:

debug(caret:::nominalTrainWorkflow)