Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornosami <jasonimison@gmail.com>2019-05-23 13:20:22 +0300
committerJeffrey Stedfast <jestedfa@microsoft.com>2019-05-28 18:26:39 +0300
commita11c0b05790dcf0a7300f177c0148f8a2eea4965 (patch)
tree7b24da64bfdef17098346459c1c17034ef0d0884 /main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol
parent1f6b20af837b49f29d58e87f4fbda85b2d0d7f34 (diff)
Break if the condition fails to execute
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol')
-rw-r--r--main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs10
1 files changed, 5 insertions, 5 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 09e8b8e1d8..2d195f82cf 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
@@ -314,7 +314,7 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol
return sb.ToString();
}
- bool EvaluateCondition (int frameId, string exp)
+ bool? EvaluateCondition (int frameId, string exp)
{
var response = protocolClient.SendRequestSync (new EvaluateRequest (exp, frameId)).Result;
@@ -323,7 +323,7 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol
OnDebuggerOutput (false, $"The condition for an exception catchpoint failed to execute. The condition was '{exp}'. The error returned was '{response}'.\n");
- return false;
+ return null;
}
bool ShouldStopOnExceptionCatchpoint (Catchpoint catchpoint, int frameId)
@@ -337,14 +337,14 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol
var qualifiedExceptionType = catchpoint.ExceptionName.Contains ("::") ? catchpoint.ExceptionName : $"global::{catchpoint.ExceptionName}";
if (catchpoint.IncludeSubclasses) {
- if (!EvaluateCondition (frameId, $"$exception is {qualifiedExceptionType}"))
+ if (EvaluateCondition (frameId, $"$exception is {qualifiedExceptionType}") == false)
return false;
} else {
- if (!EvaluateCondition (frameId, $"$exception.GetType() == typeof({qualifiedExceptionType})"))
+ if (EvaluateCondition (frameId, $"$exception.GetType() == typeof({qualifiedExceptionType})") == false)
return false;
}
- return string.IsNullOrWhiteSpace (catchpoint.ConditionExpression) || EvaluateCondition (frameId, catchpoint.ConditionExpression);
+ return string.IsNullOrWhiteSpace (catchpoint.ConditionExpression) || EvaluateCondition (frameId, catchpoint.ConditionExpression) != false;
}
protected void HandleEvent (object sender, EventReceivedEventArgs obj)