I’m debugging R code with browser().
The function pauses the execution of the current R script and allows for inspection.
Is it possible to enable/disable the debug mode on the fly, during the execution?
With large scripts it would be very handy.
Thanks
Your question prompted me to read
?browser. The documentation says you can use theexpr=argument tobrowserto create (the illusion) of conditional debugging. That, combined with a global option should give you what you want.