Unwanted behavior when debugging with the browser() function

19 views
Skip to first unread message

Roman Gulati

unread,
Nov 28, 2020, 10:31:10 PM11/28/20
to Nvim-R
Hi. I recently upgraded to Nvim-R 0.9.14 (now have a clean install with Vim 8.2 on Ubuntu 20.04) and discovered there are new and unwanted changes to the behavior when debugging code using R's browser() function.

When I source a script (foo.R) that contains the browser() function somewhere, now a new Vim buffer (foo.R.tmp.R) opens. If I interrogate an object in my script, focus shifts to the console buffer instead of staying put. If I manually shift focus back to the code buffer, it shifts back to the line containing the buffer() function even if I had navigated away from it. It used to be that I could keep focus on my script and freely navigate around interrogating objects using RAction shortcuts for "dim()", "head()", etc. Now it seems I have to toggle back and forth between the code and console buffers, repeat any navigation commands, and manually reload my script to save any changes I make. These changes are unhelpful and unwanted.

I tried unsuccessfully to disable these changes by experimenting with settings in my .vimrc like:

let R_debug=0
let R_disable_cmds=['RDebug', 'RUndebug']

I searched the documentation, the source code, and Google Groups conversations, but I haven't found any guidance about this issue. Please help me to disable this behavior. Thanks very much!

Jakson Alves de Aquino

unread,
Nov 29, 2020, 11:45:46 AM11/29/20
to Nvim-R
The option R_debug was added after the release of Nvim-R 0.9.14.

Roman Gulati

unread,
Nov 29, 2020, 8:30:15 PM11/29/20
to Nvim-R
Thanks for your fast response! I didn't realize I wasn't working with the latest stable release. Now I've updated and confirmed that letting R_debug=0 in my .vimrc disables the new debugging behavior as desired. Thank you for your help and for all your work on this valuable plugin.
Reply all
Reply to author
Forward
0 new messages