class A(object):

    def __init__(self):
        self.X = []

def f(self):
    for i in range(10):
        self.X.append(i)
pdb.set_trace()
if __name__ == '__main__':
    a = A()
a.f()
Set debugger breakpoint at end of a function without return