Skip to content

Instantly share code, notes, and snippets.

@moritzpschwarz
Last active December 21, 2020 04:17
Show Gist options
  • Save moritzpschwarz/689bcdcdfcbb7ee6e4a1545d2557e18d to your computer and use it in GitHub Desktop.
Save moritzpschwarz/689bcdcdfcbb7ee6e4a1545d2557e18d to your computer and use it in GitHub Desktop.
This is a function that can be executed, when using Debugging and being in the browser. This will save all variables that are in the environment of the function into the global environment. The source for this comes from [StackOverflow](https://stackoverflow.com/questions/55809121/is-there-a-way-to-save-variables-in-debugger-mode-to-global-envir…
lapply(ls(), function(o) assign(x = o, value = get(o), envir = .GlobalEnv))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment