Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aryoda opened this issue Dec 7, 2018 · 2 comments

Comments

@aryoda
Copy link
Owner

aryoda commented Dec 7, 2018

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
Copy link
Owner Author

aryoda commented Jul 31, 2022

Could be done together with #48

@aryoda
Copy link
Owner Author

aryoda commented Apr 16, 2023

Releated to #78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant