Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome Developer Tools Response/Preview Tab "Pretty Print" or "Formatting"

Does anyone know of a tool or extension to the chrome developer tools that will take the response of a request and format it if it's XML or JSON. I've done quite a bit of looking and have not been able to find any type of tool to properly format the response tab given xml or json response text.

enter image description here

like image 988
DRobertE Avatar asked Oct 22 '12 19:10

DRobertE


People also ask

How do I enable pretty print in Chrome?

If it's the Sources panel, you can manually enable or disable pretty-printing by clicking Format. In general, if you see that icon anywhere, clicking it will enable or disable pretty-printing.

What is the use of preview tab in dev tools?

Preview / Response The Preview and Response tabs display a small preview of the selected resource. The developer tools is smart enough to correctly display the response's content. Images display as rendered images, XML as text, etc. You'll also find extra information such as image sizes, content-type, etc.


1 Answers

In your screenshot, you just select the 'preview' tab. Works for me, anyway. Maybe you don't have the Content-Type response header set correctly?

It works if the response code is 200. (Maybe if its 2xx). I found it doesn't work if the response code is 500, though.

like image 158
romacafe Avatar answered Sep 23 '22 23:09

romacafe