This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Stepping into a generator throw does not work
Type: behavior Stage: test needed
Components: Library (Lib) Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, bwmulder
Priority: normal Keywords:

Created on 2006-11-07 20:05 by bwmulder, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
post.py bwmulder, 2006-11-07 20:05 reproducing script.
Messages (3)
msg30475 - (view) Author: Bernhard Mulder (bwmulder) Date: 2006-11-07 20:05
Python version: 2.6
Platform: Windows XP

Stepping into a throw of an iterator with the debugger
does not work.

To reproduce:

1. Run the attached script
2. type 's' for single step once you see the debugger
prompt.

I am getting this backtrace:

  File "C:\bwm\Cruiser\play\microthreads\post.py", line
24, in <module>
    it.throw(E, E())
  File "C:\bwm\Cruiser\play\microthreads\post.py", line
7, in f1
    (yield (2,(self.f2,(exc_class,))))
  File "C:\Python25\lib\bdb.py", line 50, in trace_dispatch
    return self.dispatch_call(frame, arg)
  File "C:\Python25\lib\bdb.py", line 79, in dispatch_call
    self.user_call(frame, arg)
  File "C:\Python25\lib\pdb.py", line 134, in user_call
    self.interaction(frame, None)
  File "C:\Python25\lib\pdb.py", line 185, in interaction
    self.setup(frame, traceback)
  File "C:\Python25\lib\pdb.py", line 109, in setup
    self.stack, self.curindex = self.get_stack(f, t)
  File "C:\Python25\lib\bdb.py", line 318, in get_stack
    i = max(0, len(stack) - 1)
msg30476 - (view) Author: Bernhard Mulder (bwmulder) Date: 2006-11-15 21:15
I got the Python version wrong above. The problem has been observed with Python 2.5, not 2.6 (don't know about other Python versions).
msg89734 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2009-06-26 17:10
The problem does reproduce with 2.5.1, but not with 2.5.2.

This is actually the same as issue1265 (since closing a paused generator
throws it a GeneratorExit exception, and of course pdb must use
generators somewhere)
History
Date User Action Args
2022-04-11 14:56:21adminsetgithub: 44207
2009-06-26 17:10:23amaury.forgeotdarcsetstatus: open -> closed

nosy: + amaury.forgeotdarc
messages: + msg89734

resolution: out of date
2009-03-30 17:23:34ajaksu2setstage: test needed
type: behavior
versions: + Python 2.6, - Python 2.5
2006-11-07 20:05:35bwmuldercreate