Search code examples
python-3.xspyderipdb

can I debug modules step by step in Spyder?


Debugging works step by step only in the main script. Can I somehow see what is happening in the functions from the imported modules without moving their contents in my main script?

For example I would like to see what's inside a,b&c variables.

module.py:

def a_b():
    a=1
    b=2
    c=a+b
    return c

My main script:

from module import a_b
x=2
y=3
z=x*y
print (z)
print (a_b())

Solution

  • Click the Step into function (CTRL+F11)