recover()
When you set options(error = recover)
, when you get an error, you’ll get an interactive prompt that displays the traceback and gives you the ability to interactively debug inside any of the frames:
You can return to default error handling with options(error = NULL)
.