View AJAX response content in Chrome developer tools? View AJAX response content in Chrome developer tools? google-chrome google-chrome

View AJAX response content in Chrome developer tools?


If you are on a dev channel of Google Chrome:

http://www.chromium.org/getting-involved/dev-channel

...you should be able to right-click in the Developer Tools console, and click "Enable XMLHttpRequest logging".

Once it is enabled, you will see the XHR requests in the console, and will be able to click on them to take you to the resources panel, where you'll be able to see the content of an XHR.


What you might be seeing is only the OPTIONS request of a CORS request being treated as an XHR request by Google Chrome inspector. So if you filter by XHR requests, you might only see the initial OPTIONS preflight request, whose response has no content, and get confused because it seems like Chrome is refusing to show the response. Disable the filter and go to the next request for that same URL, which will most likely be the "real" request corresponding to that CORS preflight request.


I encountered the same problem: POST request from flash + JSON response + no response displayed in Chrome inspector. No problem with FF + FireBug though.

Adding charset=utf-8 to Content-Type in the response headers solved the problem for me:

Content-Type: application/json; charset=utf-8

I'm not sure if this is the proper solution for this issue, but at least I'm able to see now the JSON response in Chrome Inspector.