diff --git a/RestSharp/RestResponse.cs b/RestSharp/RestResponse.cs
index 7ffdf9510..afba54b02 100644
--- a/RestSharp/RestResponse.cs
+++ b/RestSharp/RestResponse.cs
@@ -18,12 +18,15 @@
using System.Collections.Generic;
using System.Net;
using RestSharp.Extensions;
+using System.Diagnostics;
namespace RestSharp
{
+
///
/// Base class for common properties shared by RestResponse and RestResponse[[T]]
///
+ [DebuggerDisplay("{DebuggerDisplay()}")]
public abstract class RestResponseBase
{
private string _content;
@@ -133,12 +136,23 @@ public ResponseStatus ResponseStatus
/// The exception thrown during the request, if any
///
public Exception ErrorException { get; set; }
+
+
+ ///
+ /// Assists with debugging responses by displaying in the debugger output
+ ///
+ ///
+ protected string DebuggerDisplay()
+ {
+ return string.Format("{0}: {1} ({2})", StatusCode, ContentType, ContentLength);
+ }
}
///
/// Container for data sent back from API including deserialized data
///
/// Type of data to deserialize to
+ [DebuggerDisplay("{DebuggerDisplay()}")]
public class RestResponse : RestResponseBase, IRestResponse
{
///
@@ -171,5 +185,6 @@ public static explicit operator RestResponse(RestResponse response)
///
/// Container for data sent back from API
///
+ [DebuggerDisplay("{DebuggerDisplay()}")]
public class RestResponse : RestResponseBase, IRestResponse { }
}