diff --git a/remote.go b/remote.go
index <HASH>..<HASH> 100644
--- a/remote.go
+++ b/remote.go
@@ -193,6 +193,17 @@ func (wd *remoteWD) execute(method, url string, data []byte) ([]byte, error) {
 	}
 
 	buf, err := ioutil.ReadAll(response.Body)
+
+	// Are we in debug mode, and did we read the response Body successfully?
+	if debugFlag && err == nil {
+		// Pretty print the JSON response
+		prettyBuf := bytes.NewBufferString("")
+		err = json.Indent(prettyBuf, buf, "", "    ")
+		if prettyBuf.Len() > 0 {
+			buf = prettyBuf.Bytes()
+		}
+	}
+
 	debugLog("<- %s [%s]\n%s",
 		response.Status, response.Header["Content-Type"], buf)
 	if err != nil {
Added pretty printing of json responses.