1

I am entering breakpoints and selecting code and hitting Ctrl+F11. I thought I could do this and step through Python code one line at a time. This is exactly how it works in VBA, VB.NET, and C#.NET. I'm not sure why I can't step through the code one line at a time using Spyder. Am I missing something simple, or is this not possible?

enter image description here

Here is the code sample that I am working with.

infilepath = "C:/Users/Excel/Desktop/test.csv"
chunksize = 100
def splitfile(infilepath, chunksize):
    fname, ext = infilepath.rsplit('.',1)
    i = 0
    written = False
    with open(infilepath) as infile:
        while True:
            outfilepath = "{}{}.{}".format(fname, i, ext)
            with open(outfilepath, 'w') as outfile:
                for line in (infile.readline() for _ in range(chunksize)):
                    outfile.write(line)
                written = bool(line)
            if not written:
                break
            i += 1

Thanks to all.

ASH
  • 20,759
  • 19
  • 87
  • 200
  • Take a look here https://stackoverflow.com/questions/28280308/how-do-i-debug-efficiently-with-spyder-in-python – lwy19 Sep 24 '19 at 21:04

0 Answers0