Skip to content

Commit 3e297bc

Browse files
github-actions[bot]mdh1418jeffschwMSFT
authored
[release/9.0-staging] [BrowserDebugProxy] Remove exception details from error report (#111202)
* [BrowserDebugProxy] Remove exception details from error report * Update event name --------- Co-authored-by: mdh1418 <[email protected]> Co-authored-by: Jeff Schwartz <[email protected]>
1 parent fc350c1 commit 3e297bc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/mono/browser/debugger/BrowserDebugProxy/MonoProxy.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -916,13 +916,13 @@ protected async Task<bool> EvaluateCondition(SessionId sessionId, ExecutionConte
916916
logger.LogDebug($"Unable to evaluate breakpoint condition '{condition}': {ree}");
917917
SendLog(sessionId, $"Unable to evaluate breakpoint condition '{condition}': {ree.Message}", token, type: "error");
918918
bp.ConditionAlreadyEvaluatedWithError = true;
919-
SendExceptionToTelemetry(ree, "EvaluateCondition", sessionId, token);
919+
ReportDebuggerExceptionToTelemetry("EvaluateCondition", sessionId, token);
920920
}
921921
catch (Exception e)
922922
{
923923
Log("info", $"Unable to evaluate breakpoint condition '{condition}': {e}");
924924
bp.ConditionAlreadyEvaluatedWithError = true;
925-
SendExceptionToTelemetry(e, "EvaluateCondition", sessionId, token);
925+
ReportDebuggerExceptionToTelemetry("EvaluateCondition", sessionId, token);
926926
}
927927
return false;
928928
}
@@ -1521,27 +1521,27 @@ private async Task<bool> OnEvaluateOnCallFrame(MessageId msg_id, int scopeId, st
15211521
catch (ReturnAsErrorException ree)
15221522
{
15231523
SendResponse(msg_id, AddCallStackInfoToException(ree.Error, context, scopeId), token);
1524-
SendExceptionToTelemetry(ree, "OnEvaluateOnCallFrame", msg_id, token);
1524+
ReportDebuggerExceptionToTelemetry("OnEvaluateOnCallFrame", msg_id, token);
15251525
}
15261526
catch (Exception e)
15271527
{
15281528
logger.LogDebug($"Error in EvaluateOnCallFrame for expression '{expression}' with '{e}.");
15291529
var ree = new ReturnAsErrorException(e.Message, e.GetType().Name);
15301530
SendResponse(msg_id, AddCallStackInfoToException(ree.Error, context, scopeId), token);
1531-
SendExceptionToTelemetry(e, "OnEvaluateOnCallFrame", msg_id, token);
1531+
ReportDebuggerExceptionToTelemetry("OnEvaluateOnCallFrame", msg_id, token);
15321532
}
15331533

15341534
return true;
15351535
}
15361536

1537-
private void SendExceptionToTelemetry(Exception exc, string callingFunction, SessionId msg_id, CancellationToken token)
1537+
private void ReportDebuggerExceptionToTelemetry(string callingFunction, SessionId msg_id, CancellationToken token)
15381538
{
1539-
JObject reportBlazorDebugError = JObject.FromObject(new
1539+
JObject reportBlazorDebugException = JObject.FromObject(new
15401540
{
15411541
exceptionType = "uncaughtException",
1542-
error = $"{exc.Message} at {callingFunction}",
1542+
exception = $"BlazorDebugger exception at {callingFunction}",
15431543
});
1544-
SendEvent(msg_id, "DotnetDebugger.reportBlazorDebugError", reportBlazorDebugError, token);
1544+
SendEvent(msg_id, "DotnetDebugger.reportBlazorDebugException", reportBlazorDebugException, token);
15451545
}
15461546

15471547
internal async Task<GetMembersResult> GetScopeProperties(SessionId msg_id, int scopeId, CancellationToken token)

0 commit comments

Comments
 (0)