Reputation: 59
I try to debug my Python script within RStudio IDE using pdb package. The scripts looks the following:
a=1
breakpoint()
b= 2
c = 5
k = 10
When i try to print some output (p a) in the console nothing happens. If i quit the debugger using the command q the variable displays. Why the p command do not show any output within debugging mode?
Upvotes: 1
Views: 204
Reputation: 1
I could also not find a native way to debug python code in RStudio, but used ipdb which is an iterative debugger for python
try:
import ipdb
ipdb.set_trace()
then run:
python -m ipdb Run-Script.py
I followed this guide here: https://hasil-sharma.github.io/2017-05-13-python-ipdb/
Upvotes: 0