I am looking for a way to put a breakpoint during an execution of an R script either using Rscript script.R or R --vanilla --silent -f script.R.
I'd expect that R --vanilla --slave -e 'browser()' would not just output Called from: top level and exit, but instead break and open the Browse[1]> > shell.
Is there a way to achieve that in R using browser(), debugger(), etc?