如何在 RStudio 中启动 Python 代码调试器
我创建了一个虚拟环境,想在 RStudio 中使用 python 代码。 但是我不清楚如何开始调试? 如果我切换到 Python 代码,我无法设置任何断点。如果我切换回 R 代码,它就可以工作。
I created a virtual environment and want to use python code in RStudio.
However It is not clear for me how to start debugging?
If i switch to Python Code I cannot set any breakpoints. If i switch back to R Code it works.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

显然,RStudio 还不是原生的,无法在其中设置断点和调试 Python 代码。
但我发现 ipdb 是一个迭代式 python 调试器,可以在 RStudio 中导入和使用。
操作方法如下: https://hasil-sharma.github.io /2017-05-13-python-ipdb/
Apparently it is not yet RStudio native to set breakpoints and debug Python code there.
But I found ipdb which is an iterative python debugger that can be imported and used in RStudio.
Here is how: https://hasil-sharma.github.io/2017-05-13-python-ipdb/