strange error: Debugger does not find source

2019-07-24 18:22发布

问题:

Really weird: We have a package in our group containing several functions. Debugging worked until last week using browser() and debug(package::function). Now, debugging is not working on my laptop for just ONE function out of the package. Using the laptop of my colleague, debugging is runnning for every function!

Does anybody have an idea, where to look for the error? I tried:

  • Restart RStudio
  • Restart laptop
  • Build / reload package
  • Delete function, build and reload package. Rename function and put into different .R file

with no success. Where do I have to further search? As said: The problem is not reproducable on another PC :-(

What I would do in the worst case:

  • Install new R
  • Install new RStudio
  • Install new Rtools

But I hope, somebody has a better idea.
Help is highly appreciated!

platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          3                           
minor          3.0                         
year           2016                        
month          05                          
day            03                          
svn rev        70573                       
language       R

Edit: Here, everything is running...

platform       x86_64-apple-darwin13.4.0   
arch           x86_64                      
os             darwin13.4.0                
system         x86_64, darwin13.4.0        
status                                     
major          3                           
minor          2.1                         
year           2015                        
month          06                          
day            18                          
svn rev        68531                       
language       R                           
version.string R version 3.2.1 (2015-06-18)

Edit2: It seems I have a R-problem with a strange version. How can I get rid of that:

> Sys.getenv()
R_DOC_DIR                           C:/R/R-33~1.0/doc
R_HOME                              C:/R/R-33~1.0
R_LIBS_USER                         C:/Users/sqc/R/win-library/3.3
R_PACKRAT_DEFAULT_LIBPATHS          C:/R/R-3.3.0/library
R_PACKRAT_SYSTEM_LIBRARY            C:/R/R-33~1.0/library

Edit3: Perhaps this is (part of) the root cause...

回答1:

Thanks to RStudio support: In my case the root cause was a comment like # Priority hinzuf?gen. Removing this line solved the issue!

Edit: See here for a way to detect wrong formatted text!



标签: r rstudio