You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
R console doesn't recall erroneous code after pressing up arrow #16006
RStudio Edition : Desktop
RStudio Version : 2024.12.1+563
OS Version : x86_64-w64-mingw32/x64 Windows 11 x64 (build 26100)
R Version : R version 4.4.3 (2025-02-28 ucrt)
Description of the problem and steps to reproduce it
R session doesn't seem to remember previously executed erroneous code
Open up an .rmd file and starting working on the code in chunks
When code execution fails with an error either in the console or in the chunks, up arrow doesn't recall this last code in the R console (history pane shows the erroneous code but R console doesn't recall)
Problem doesn't occur when R executable is used (wrong code is recalled upon pressing up arrow)
Although I can't reproduce it easily, sometimes the same situation occurs when trying to recall successfully executed lines as well. In such cases clearing the console with Ctrl+L helped but not always. I know this is not much info but I will try to update the issue if I can get it to repeat.
Describe the behavior you expected
Regardless of whether a code successfully executes or not, up arrow should bring back the last code. This is helpful especially for correcting arguments in multi-line function calls
With the latest version of RStudio (2025.05.0+496 "Mariposa Orchid" Release (f0b76cc, 2025-05-04)), the problem seems to be solved, thanks!
In this version though, I am having a different type of a problem which was raised previously (#16000). Code chunk continues executing without stopping the flow. It would be a better behavior if the execution stops when encountered an error. I just wanted to drop this as a comment to possibly help narrow down the issue. Thanks for all you do!
# forgot to load the package
# library(dplyr)
# Continues executing after error
x<- left_join(x, y, by=c("x_var"="y_var"))
>Error in left_join(meta, metab_patients, by = c(patient = "TCGA.Designation")) :
> could not find function "left_join"
>Error during wrapup: not that many frames on the stack
>Error: no more error handlers available (recursive errors?); invoking 'abort' restart
...
Verified in RStudio Desktop 2025.05.1+512 on Windows 11.
Also added this test:
```{r third}
a <- 83
b <- 112
m
c <- 12
d <- 9003
```
Running the chunk: The first two lines will execute successfully, with failure on the third. Clicking on the up-arrow in the console will show these three commands as a block, up to the failed line.
Activity
ronblum commentedon May 12, 2025
@atakanekiz Thank you for raising the issue! I can reproduce it in RStudio Desktop 2024.12.1 on Windows 11. We've marked it for review.
ronblum commentedon May 12, 2025
Note: This is a regression, as it works correctly in version 2024.09.1+388.
atakanekiz commentedon May 15, 2025
Hey there!
With the latest version of RStudio (2025.05.0+496 "Mariposa Orchid" Release (f0b76cc, 2025-05-04)), the problem seems to be solved, thanks!
In this version though, I am having a different type of a problem which was raised previously (#16000). Code chunk continues executing without stopping the flow. It would be a better behavior if the execution stops when encountered an error. I just wanted to drop this as a comment to possibly help narrow down the issue. Thanks for all you do!
kevinushey commentedon May 15, 2025
Thanks -- this is a known issue, and we're hoping to fix this in an upcoming patch release of RStudio. If you'd like to test, builds of the upcoming patch release are being published at https://dailies.rstudio.com/rstudio/mariposa-orchid/.
ronblum commentedon May 27, 2025
This is still failing (surprise, because I thought that I saw it work earlier).
Error: object 'y' not found, as expected.yappears in the History Pane.Occurs in RStudio Desktop 2025.5.1.508 on Windows 11 and RStudio Server 2025.5.1.50 on Ubuntu 24 via Edge on Windows 11.
ronblum commentedon May 30, 2025
Verified in RStudio Desktop 2025.05.1+512 on Windows 11.
Also added this test:
Running the chunk: The first two lines will execute successfully, with failure on the third. Clicking on the up-arrow in the console will show these three commands as a block, up to the failed line.
QA note: ref: #3520
complete BRAT to Playwright migration (#17713)