View changeset 41aa3fe86341 on CodePlex.
207 – same file gets opened multiple times when debugging
We were missing a ProvideEditorLogicalView attribute for the debugger view.
204 – crash inside visualstudio_py_debugger.py when up against the recursion limit
Adds probes to the debugger to test for low-stack conditions so we take an exception earlier and can remain in a consistent state. Prevent exceptions from propagating out of our trace function.
We only need to probe in a few places – generally we need to make sure we have enough stack space before we commit to doing real work – such as communicating with VS. Therefore we almost always are doing something expensive and the extra empty calls should be alright.
There’s still one condition we cannot handle and there’s no fix for it at this time (probably needs a chance on the Python interpreter side, or we need to have an optional top-level trace function which is not a Python function) – if we’re right at the stack limit when calling our trace function we’ll immediately take a stack overflow exception w/o being able catch it. When an unhandled exception rips out of a trace function we get no chance to handle it and therefore our tracing gets disabled. The debugger at that point is effectively turned off for the thread that has stack overflowed. And on Python 3k it’s even worse – we can eventually hit a real stack overflow as recursion checks seem to get turned off (maybe they tried to fix the 1st issue?). In either case this seems like a CPython issue as no debugger can handle these cases.
Also fixing yet another failing auto indent case I ran into.
And removing the un-used “Interactive options” from the interpreter options control – this is now controlled via the interactive window (this value was previously being ignored and is actually a legacy option left over from the IronPython tools days).