问题描述
真的很奇怪:我们组中有一个包含多个函数的包.直到上周使用 browser()
和 debug(package::function)
进行调试.现在,调试在我的笔记本电脑上无法运行,仅用于包中的一项功能.使用我同事的笔记本电脑,每个功能都在调试!
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:
- 重启 RStudio
- 重启笔记本电脑
- 构建/重新加载包
- 删除函数、构建和重新加载包.重命名函数并放入不同的 .R 文件
没有成功.我必须在哪里进一步搜索?如前所述:该问题无法在另一台 PC 上重现:-(
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:
- 安装新的 R
- 安装新的 RStudio
- 安装新的 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:似乎我有一个奇怪版本的 R 问题.我怎样才能摆脱它:
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:也许这是 根本原因...
推荐答案
感谢 RStudio 的支持:就我而言,根本原因是像 # Priority hnzuf?gen
这样的评论.删除此行解决了问题!
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!
这篇关于奇怪的错误:调试器找不到源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!