I'm a student using PyScripter to learn Python. I'm attempting to step-by-step debug the following code:
import turtle__import__("turtle").__traceable__ = False
def draw_rectangle(t, w, h):
"""Get turtle t to draw a rectangle of width w and heigh h."""
for i in range(2):
def draw_square(tx, sz):
draw_rectangle(tx, sz, sz)
wn = turtle.Screen()
tess = turtle.Turtle()
bill = turtle.Turtle()
draw_rectangle(tess, 100, 200)
When running step-by-step debugging, Pyscripter pulled up additional modules and files that I did not wish to view (e.g., tkinter, ntpath.py). I found an IDE option to mark "step into open files only" as True. I went ahead and did this.
I'm still unable to complete the step-by-step debug though. When I get to the wn = turtle.Screen() line, the step-by-step debugging seems to fail. Previously, at each click of F4, the highlighted line would proceed through the program. Clicking F4 once the wn = turtle.Screen() line is highlighted though removes the highlight and PyScripter seemingly becomes unresponsive. The debugger session is still active, as I still have the ability to abort the session, but I can't continue my step-by-step exploration.
Any ideas on why I'm getting stuck with this step-by-step debugging? Any thoughts at how I can step-by-step debug just my code?