@@ -509,6 +509,7 @@ function generateSessionEventsCode(schema: JSONSchema7): string {
509509// AUTO-GENERATED FILE - DO NOT EDIT
510510// Generated from: session-events.schema.json
511511
512+ using System.Diagnostics;
512513using System.Text.Json;
513514using System.Text.Json.Serialization;
514515
@@ -519,6 +520,7 @@ namespace GitHub.Copilot.SDK;
519520 lines . push ( `/// <summary>` ) ;
520521 lines . push ( `/// Provides the base class from which all session events derive.` ) ;
521522 lines . push ( `/// </summary>` ) ;
523+ lines . push ( `[DebuggerDisplay("{DebuggerDisplay,nq}")]` ) ;
522524 lines . push ( `[JsonPolymorphic(` , ` TypeDiscriminatorPropertyName = "type",` , ` UnknownDerivedTypeHandling = JsonUnknownDerivedTypeHandling.FailSerialization)]` ) ;
523525 for ( const variant of [ ...variants ] . sort ( ( a , b ) => a . typeName . localeCompare ( b . typeName ) ) ) {
524526 lines . push ( `[JsonDerivedType(typeof(${ variant . className } ), "${ variant . typeName } ")]` ) ;
@@ -537,7 +539,9 @@ namespace GitHub.Copilot.SDK;
537539 lines . push ( ` /// <summary>Deserializes a JSON string into a <see cref="SessionEvent"/>.</summary>` ) ;
538540 lines . push ( ` public static SessionEvent FromJson(string json) =>` , ` JsonSerializer.Deserialize(json, SessionEventsJsonContext.Default.SessionEvent)!;` , "" ) ;
539541 lines . push ( ` /// <summary>Serializes this event to a JSON string.</summary>` ) ;
540- lines . push ( ` public string ToJson() =>` , ` JsonSerializer.Serialize(this, SessionEventsJsonContext.Default.SessionEvent);` , `}` , "" ) ;
542+ lines . push ( ` public string ToJson() =>` , ` JsonSerializer.Serialize(this, SessionEventsJsonContext.Default.SessionEvent);` , "" ) ;
543+ lines . push ( ` [DebuggerBrowsable(DebuggerBrowsableState.Never)]` , ` private string DebuggerDisplay => ToJson();` ) ;
544+ lines . push ( `}` , "" ) ;
541545
542546 // Event classes with XML docs
543547 for ( const variant of variants ) {
0 commit comments