tryCatchLog icon indicating copy to clipboard operation
tryCatchLog copied to clipboard

Document differences of post-mortem debugging using dump.frames vs tryCatchLog

Open aryoda opened this issue 7 years ago • 2 comments

Standard R also supports post-mortem dumps + debugging, see the description here:

https://cran.r-project.org/doc/manuals/R-exts.html#Debugging-R-code

... find out more about what was happening at the time of the crash by looking a post-mortem dump. To do so, set options(error=dump.frames) and run the code again. Then invoke debugger() and explore the dump. To do so, set options(error=dump.frames) and run the code again. Then invoke debugger() and explore the dump.

Because last.dump can be looked at later or even in another R session, post-mortem debugging is possible even for batch usage of R.

Post-mortem debugging is good for finding out exactly what went wrong, but not necessarily why. An alternative approach is to take a closer look at what was happening just before the error, and a good way to do that is to use debug. This inserts a call to the browser at the beginning of the function, starting in step-through mode.

Document the differences + usage recommendations

aryoda avatar Dec 07 '18 21:12 aryoda

Could be done together with #48

aryoda avatar Jul 31 '22 16:07 aryoda

Releated to #78

aryoda avatar Apr 16 '23 10:04 aryoda