diff options
author | Keting Yang <ketyang@microsoft.com> | 2019-12-19 18:30:16 +0300 |
---|---|---|
committer | monojenkins <jo.shields+jenkins@xamarin.com> | 2019-12-19 21:41:03 +0300 |
commit | 9a256469a0cc860990ad91adb5042b0d931b48bf (patch) | |
tree | 4d8551cf39bbf20cef97ee948e2074a5bb54a629 /main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol | |
parent | 35fd155be530efcdbfd8891d20009be77e0822ea (diff) |
Throw exceptions appropriately
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol')
-rw-r--r-- | main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs b/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs index f5f35302f7..1985da30b6 100644 --- a/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs +++ b/main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs @@ -408,7 +408,15 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol // It's OK to evaluate expressions in external code stackFrame = (VsCodeStackFrame)backtrace.GetFrame (0); } - args = new TargetEventArgs (TargetEventType.UnhandledException); + if (body.Text.Contains ("but was not handled in user code")){ + args = new TargetEventArgs (TargetEventType.UnhandledException); + } else { + if (!breakpoints.Select (b => b.Key).OfType<Catchpoint> ().Any (c => ShouldStopOnExceptionCatchpoint (c, stackFrame.frameId))) { + OnContinue (); + return; + } + args = new TargetEventArgs (TargetEventType.ExceptionThrown); + } break; default: throw new NotImplementedException (body.Reason.ToString ()); |