-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Improve the debugging experience #288
Comments
This is working as expected: the The solution is to import the relevant name, e.g.: box::use(utils[View]) |
Neither this, nor
|
The issue here is that RStudio overrides Unfortunately there is no really nice way to do this because of the somewhat hacky way RStudio injects itself into the R session, but the following works: get('View', envir = .GlobalEnv)(datasets::mtcars) |
Thank you! |
Would it be possible to make a specific browser() function for box modules or somehow import these basic |
@nvelden I’m not happy with the current state of affairs myself. However, I don’t think providing a bunch of custom functions that replace the base R debugging utilities is the answer. In particular, it wouldn’t just be one function ( Rather, I think a better approach would be to hook into all these core R debugging utilities when ‘box’ is loaded. Then, when R drops into the debugger, ‘box’ could “attach” a utility environment that contains things like |
Sounds like the root issue here is that RStudio is starting to follow Microsoft's "embrace, extend, extinguish" pattern and is forcing non-standard behavior that breaks R itself. |
Error description
May just be me missing something, but whenever I load an environment using the box architecture, and then call a function which contains a
browser()
within it, the debug mode loads up fine and works smoothly, but if I try to callView()
on any object within the debug environment, I get the following error:Error in View(df2) : could not find function "View"
does this mean I need to load the utils separately using box as well? It can be quite cumbersome to do so.
Example below:
If I have the file structure:
R/run.R
R/fct_custom.R
run.R:
R/fct_custom:
R version
‘box’ version
‘1.1.2’
The text was updated successfully, but these errors were encountered: