R, debug line number

When debugging a function (which was marked by debug using debug("f") , the debugger gives you a Browser prompt that also tells you what line number is in your program. If you run several test statements on (to check variables, etc. .) scroll the screen and I no longer know what line number I find (using SecureCRT to scroll past the buffer). The where command only tells you what function you are in. know how to get the actual line number and the next statement, which will be executed?

thanks

+4
source share
1 answer

When I use regular browser() , I set max.lines to print to a low number:

Parameters (deparse.max.lines = 100)

so if the output during debugging is long, I don’t need to scroll too far.

-one
source

Source: https://habr.com/ru/post/1397901/


All Articles