Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79179
| Date | 2014-10-15 20:52 +0100 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: How to debug Python IDLE? |
| References | <f1fbc7fd-0359-4cc1-b71f-7ec9caee0e12@googlegroups.com> <mailman.14891.1413400990.18130.python-list@python.org> <e38339b7-f094-4f52-8e95-522a3fb7f081@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14897.1413402739.18130.python-list@python.org> (permalink) |
On 2014-10-15 20:36, ryguy7272 wrote: > On Wednesday, October 15, 2014 3:23:22 PM UTC-4, Terry Reedy wrote: >> On 10/15/2014 3:09 PM, ryguy7272 wrote: >> >> > I'm wondering how to debug code in IDLE Python 3.4. I found this. >> >> >> >> Use 3.4.2, which has an important bugfix for debugger. >> >> >> >> > http://www.cs.uky.edu/~paulp/CS115F11/notes/debug/debug.html >> >> > >> >> > That looks pretty helpful, >> >> >> >> > but mine is nothing like that. All my controls are greyed out. >> >> >> >> That is normal when you first turn debugger on. You have to load a file >> >> in the editor and then run it (F5). On the site above, the file is >> >> volume.py. The the debugger is 'activated'. >> >> >> >> -- >> >> Terry Jan Reedy > > > Oh, I didn't know that's how it works. ok. Makes sense. Something is still wrong though. I have a file named 'test_script.py'. > > Here's the code: > > def showMaxFactor(num): > count = num / 2 > while count > 1: > if num % count == 0: > print 'largest factor of %d is %d' % \ > (num, count) > break > count -= 1 > else: > print num, "is prime" > for eachNum in range(10, 21): > showMaxFactor(eachNum) > > With the debugger ON, I hit F5 and get this. > 'Expected an indent block' > > I wouldn't say that's debugging anything. I can't tell what line is throwing the error, or how to fix it. > > Any thoughts? > The 'print' line is indented the same as the 'if' line.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to debug Python IDLE? ryguy7272 <ryanshuell@gmail.com> - 2014-10-15 12:09 -0700
Re: How to debug Python IDLE? Terry Reedy <tjreedy@udel.edu> - 2014-10-15 15:22 -0400
Re: How to debug Python IDLE? ryguy7272 <ryanshuell@gmail.com> - 2014-10-15 12:36 -0700
Re: How to debug Python IDLE? MRAB <python@mrabarnett.plus.com> - 2014-10-15 20:52 +0100
Re: How to debug Python IDLE? Terry Reedy <tjreedy@udel.edu> - 2014-10-15 22:21 -0400
Re: How to debug Python IDLE? ryguy7272 <ryanshuell@gmail.com> - 2014-10-15 13:45 -0700
Re: How to debug Python IDLE? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-10-15 22:19 +0100
csiph-web