microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.
MIT License
818 stars 218 forks source link

Catch ProtocolException in HandleEvaluateAsync #1360

Closed WardenGnaw closed 2 years ago

WardenGnaw commented 2 years ago

Catch ProtocolException from GetDebugPropertyFromExpression. If frames change and then we get a request, GetDebugPropertyFromException would throw and crash the debug adapter.

This PR catches the exception and sets it to the responder of the Caller in HandleEvaluateAsync

Based off of @jfblazquez changes at https://github.com/microsoft/MIEngine/compare/main...jfblazquez:MIEngine:EvaluateRequestAsyncProtocolException

Related: https://github.com/microsoft/vscode-cpptools/issues/9438

jaredpar commented 2 years ago

@WardenGnaw think you @'d the wrong person here. I didn't make those changes.

WardenGnaw commented 2 years ago

@WardenGnaw think you @'d the wrong person here. I didn't make those changes.

Whoops, autocompleted to wrong person. Updated to jfblazquez