I am new debugging in R using traceback()
and option(error=recover)
and debug(function)
to try to find the reason of an error I have in an R package.
I am debugging a function with a big loop and I want to 'step out' of the loop into the next block. How can I do that? I know that you can put breakpoints, but I don't know where the loop is nor which is the next step. I am in an only text environment so the graphical help of the debug package probably does not help.
To sum up, how to step out of a loop when debugging, and how to step into a function for debug when you are already debugging?
Probably this has been already answered and I have missed it. I have seen several SO R debug question but none answering this part that I am aware.
I'm fairly sure R's help system works even if you're not using a GUI. Try typing ?debug
and see what happens. You ought to be informed that typing c
or cont
will
continue to the end of the current context: eg to the end of the loop if within a loop or to the end of the function.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.