首页 > 解决方案 > 使用 lldb 在 Rstudio 中进行 Rcpp 调试

问题描述

Jim Hester YouTube 视频视频看起来像是一种在 Rcpp 代码中放置断点的潜在非常有用的方法,它以意想不到的方式传递一些变量。但是,当我按照启动说明(下面复制的 Rstudio 控制台)时,它会失败并显示一条对 lldb 的新用户没有帮助的消息。

gcn@GCN-MacBook-Pro-7 ISIMIPData % R -d lldb
(lldb) target create "/Library/Frameworks/R.framework/Resources/bin/exec/R"
Current executable set to '/Library/Frameworks/R.framework/Resources/bin/exec/R' (x86_64).
(lldb) run
error: process exited with status -1 (attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries when the attached failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.))
(lldb) 

我能找到的 Console.app 输出不是很有用。

稍后的帖子描述了一个更新的过程,但它也以类似的方式失败。我正在使用 Rstudio 版本 1.4.1717 和 R 版本 4.1。

标签: rrstudiorcpp

解决方案


推荐阅读