View AJAX response content in Chrome developer tools?

Solution 1:

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.

Solution 2:

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.

Solution 3:

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.

Solution 4:

The content of ajax responses is not visible yet if the request is generated by a plugin. There is some chance that this problem will be fixed soon.

Solution 5:

Turn on resource tracking, then check the resources tab. Resource tracking seems to work a lot better if you check "always use resource tracking."