baff92317760

View baff92317760 on CodePlex.

Changeset Description

Activates the “User Unhandled” option for exceptions (and turns it on by default). When an exception matching the type name of one on the ‘unhandled’ list is detected, a list of exception handlers is requested (and cached) from the debugger for that file. If one of the except expressions matches the exception, it is ignored. Otherwise, the next stack frame is checked until we find a handler (and continue silently) or run out of source code or stack (and break at the frame the exception was thrown).
55 – ‘Continue’ after debugging an exception traces the stack
For user-unhandled exceptions, if the traceback has more than one frame it means we’ve seen it before, so we always continue. Exceptions with the “Thrown” option set will still break at every frame.

Modified Files

Release\Product\Python\Debugger\Debugger.csproj
Release\Product\Python\Debugger\Debugger\DebugEngine\AD7Engine.cs
Release\Product\Python\Debugger\Debugger\PythonProcess.cs
Release\Product\Python\Debugger\Debugger\TryHandlerWalker.cs (added)
Release\Product\Python\PythonTools\PythonTools\ProvideDebugExceptionAttribute.cs
Release\Product\Python\PythonTools\visualstudio_py_debugger.py

Modified Tests

Release\Tests\AnalysisTest\AnalysisTest.csproj
Release\Tests\AnalysisTest\DebuggerTests.cs
Release\Tests\AnalysisTest\ExtensionMethods.cs
Release\Tests\AnalysisTest\Python.VS.TestData\DebuggerProject\ExceptionHandlers.py (added)
Release\Tests\AnalysisTest\Python.VS.TestData\DebuggerProject\UnhandledException1.py (added)
Release\Tests\AnalysisTest\Python.VS.TestData\DebuggerProject\UnhandledException2.py (added)
Release\Tests\AnalysisTest\Python.VS.TestData\DebuggerProject\UnhandledException3.py (added)
Release\Tests\AnalysisTest\Python.VS.TestData\DebuggerProject\UnhandledException4.py (added)
Release\Tests\AnalysisTest\Python.VS.TestData\DebuggerProject\UnhandledException5.py (added)
Release\Tests\AnalysisTest\Python.VS.TestData\DebuggerProject\UnhandledException6.py (added)

Related Files

Release\Product\Python\PythonTools\PythonToolsPackage.cs
Release\Product\Python\Debugger\Debugger\DebugEngine\AD7Property.cs