Debugger should not stop on GeneratorExit and StopIteration exceptions. ptvsd:1959
@@ -14,6 +14,9 @@ if __name__ == '__main__':
def gen2():
yield 2
+ if sys.version_info[:2] < (3, 7):
+ # On Python 3.7 onwards this will generate an unhandled exception, which
+ # is not what we want.
raise StopIteration()
for i in gen2():
