Why does space_toolsystem_common.py constantly raise exceptions?

I’m trying to run blender ‘normally’ with breakpoints triggered by any raised exception, just so I can do some general hardening of my addon by working on a test model while my addon is running and debug as I go. However, space_toolsystem_common.py is constantly raising exceptions that trigger breakpoints, which makes this impossible. Is there any reason why this is happening? should it be logged as a bug?

I believe generators raise an exception to let you know they are finished.

ah, i see… i don’t have much experience with generators/coroutines in Python. doing some googling though and it seems as though you’re right. I wonder how drunk they were when they decided that the best way to end a coroutine was to raise an exception. this blows my mind.

guess i’ll just have to wait until the VSCode team implements skip_files for the python debugger. bleh.

A generator raises a specific exception at end. Setting a catch block to trap all exceptions is generally recognized as bad programming practice.

I’m not setting a catch block, I’m checking a box in the vscode debugger