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
Debugger stack shows incorrect line numbers after recover() #4917
Comments
|
@profPlum Thank you for reporting this issue. I'm unable to reproduce it, though. Perhaps my file with an error isn't error-prone enough. Would you mind proviing:
Thanks! |
|
@ronblum Hey thanks for the reply, turns out this bug is really situational. I gave you a script that can reproduce it now & updated the original post. Please take a look :) |
|
Here's a slightly more minimal example: If I source an R file with these contents, then enter the debugger, I see the wrong line numbers in the Traceback pane: It seems like the error is triggered if:
The debugger also seems to navigate frames incorrectly, highlighting the wrong bit of code as different frames are selected. @jmcphers do you think this is something worth considering for v1.3? |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions. |
|
This issue has been automatically closed due to inactivity. |


System details
Steps to reproduce the problem
Describe the problem in detail
When Rstudio enters the debugger through a call to recover(), it doesn't always get the correct line information of the stack frames and instead just uses 0. This also prevents it from seeking (via double click) the line the stack was entered on; instead it just opens the file that the relevant code is in.
I don't know what triggers this bug because sometimes things work as expected, additionally it appears that it can affect only certain stack frames & is affected by code position somehow (??).
However even the
whereCLI debugger command (executed from within Rstudio console) will show you the correct line numbers (where they are available).Describe the behavior you expected
I expected it to show/use the line numbers consistent with those shown from the
wherecommand & to seek to those lines properly (on click).diagnostics-report.txt
Output from sessionInfo()
(from inside recovered() debugger session)):
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin18.5.0 (64-bit)
Running under: macOS Mojave 10.14.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /usr/local/Cellar/openblas/0.3.6_1/lib/libopenblasp-r0.3.6.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] moments_0.14 ggplot2_3.1.1 dplyr_0.8.1 tidyr_0.8.3
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 withr_2.1.2 assertthat_0.2.1
[4] crayon_1.3.4 R6_2.4.0 grid_3.6.0
[7] plyr_1.8.4 gtable_0.3.0 magrittr_1.5
[10] scales_1.0.0 pillar_1.4.0 rlang_0.3.4
[13] lazyeval_0.2.2 rstudioapi_0.10 tools_3.6.0
[16] glue_1.3.1 purrr_0.3.2 munsell_0.5.0
[19] compiler_3.6.0 pkgconfig_2.0.2 colorspace_1.4-1
[22] tidyselect_0.2.5 tibble_2.1.1
The text was updated successfully, but these errors were encountered: