diff options
author | Michael Belyaev <usrsse2@me.com> | 2019-05-13 18:07:08 +0300 |
---|---|---|
committer | Jeffrey Stedfast <jestedfa@microsoft.com> | 2019-05-28 18:26:39 +0300 |
commit | 872095311e3a288fd2350a4ecd9c743aa3ffc54e (patch) | |
tree | 0bdc10d7e0a1b50caf30c3dece9455efb846545f /main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol | |
parent | a61148d56b526b5b4c772a911634306028729e1a (diff) |
Support exception catchpoint conditions
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol')
-rw-r--r-- | main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs | 4 |
1 files changed, 3 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 7192259b75..9c96088a36 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 @@ -370,9 +370,11 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol break; case StoppedEvent.ReasonValue.Exception: var match = VsdbgExceptionNameRegex.Match (body.Text); + stackFrame = (VsCodeStackFrame)this.GetThreadBacktrace (body.ThreadId ?? -1).GetFrame (0); if (match.Success && match.Groups.Count == 2 && !breakpoints.Select (b => b.Key).OfType<Catchpoint> ().Any (e => e.Enabled && - (match.Groups[1].Value == e.ExceptionName) || (e.IncludeSubclasses && e.ExceptionName == "System.Exception"))) + (match.Groups[1].Value == e.ExceptionName || e.IncludeSubclasses && e.ExceptionName == "System.Exception") && + (string.IsNullOrWhiteSpace(e.ConditionExpression) || EvaluateCondition (stackFrame.frameId, e.ConditionExpression) != false))) { OnContinue (); return; |