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:
authorKeting Yang <ketyang@microsoft.com>2020-01-06 19:54:25 +0300
committerKeting Yang <ketyang@microsoft.com>2020-01-06 19:54:25 +0300
commit4cd87f9b4be9e105089fbaa8e5493d9d9ae56493 (patch)
tree3f4a6cfa25da52db718f9bc6dbd4a113af2b7d5e /main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol
parent646c822be1860ea4cc5d690008f8f2ff0bf2ac03 (diff)
avoid using string to check the exception type
Diffstat (limited to 'main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol')
-rw-r--r--main/src/addins/MonoDevelop.Debugger.VSCodeDebugProtocol/MonoDevelop.Debugger.VsCodeDebugProtocol/VSCodeDebuggerSession.cs6
1 files changed, 4 insertions, 2 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 bc56c02ac5..0432d0aa52 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
@@ -168,7 +168,7 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol
currentExceptionState = hasCustomExceptions;
var exceptionRequest = new SetExceptionBreakpointsRequest (
Capabilities.ExceptionBreakpointFilters.Where (f => hasCustomExceptions || (f.Default ?? false)).Select (f => f.Filter).ToList ());
- exceptionRequest.ExceptionOptions = new List<ExceptionOptions> () { new ExceptionOptions (ExceptionBreakMode.Unhandled)};
+ exceptionRequest.ExceptionOptions = new List<ExceptionOptions> () {new ExceptionOptions(ExceptionBreakMode.UserUnhandled)};
protocolClient.SendRequest (exceptionRequest, null);
unhandleExceptionRegistered = true;
}
@@ -352,6 +352,7 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol
return string.IsNullOrWhiteSpace (catchpoint.ConditionExpression) || EvaluateCondition (frameId, catchpoint.ConditionExpression) != false;
}
+
protected void HandleEvent (object sender, EventReceivedEventArgs obj)
{
Task.Run (() => {
@@ -408,7 +409,8 @@ namespace MonoDevelop.Debugger.VsCodeDebugProtocol
// It's OK to evaluate expressions in external code
stackFrame = (VsCodeStackFrame)backtrace.GetFrame (0);
}
- if (body.Text.Contains (GettextCatalog.GetString ("but was not handled in user code"))){
+ var response = protocolClient.SendRequestSync (new ExceptionInfoRequest (body.ThreadId ?? -1));
+ if (response.BreakMode.Equals (ExceptionBreakMode.UserUnhandled)) {
args = new TargetEventArgs (TargetEventType.UnhandledException);
} else {
if (!breakpoints.Select (b => b.Key).OfType<Catchpoint> ().Any (c => ShouldStopOnExceptionCatchpoint (c, stackFrame.frameId))) {