57

I used (winter 2018) to be able to capture a JSON response using either Chrome or Firefox developer tools. Now for the long ones I need (>> 1 MB) Chrome doesn't work, and Firefox truncates at 1 megabyte. This was using the developer tools. Short ones work on Firefox.

There was a recent response on "firebug" saying it was fixed in Firefox, but no. This was a response from familytreedna.com of a big JSON file used to construct a tree. The web page works ... but it takes a long time to download the data file (11 megabytes!) Is this a bug or "feature" in the developer tools.

Mehdi Dehghani
  • 10,970
  • 6
  • 59
  • 64
Doug McDonald
  • 571
  • 1
  • 4
  • 4
  • 1
    Please add a [mcve], including an illustration of the problem. The cause may be in the way you handle the data or in the way you interact with a server, or in your server logic. – ivan_pozdeev Aug 06 '18 at 17:48
  • https://stackoverflow.com/questions/50939126/how-to-debug-ajax-response may help to find out if the response is really truncated in the runtime, or it's just the devtools UI not showing it all. – ivan_pozdeev Aug 06 '18 at 17:49

2 Answers2

123

Firefox dev tools network inspector still truncates responses to 1MB by default.

You can change or disable the limit by navigating to about:config and changing devtools.netmonitor.responseBodyLimit. To disable the limit, set it to 0.

enter image description here

Joni
  • 108,737
  • 14
  • 143
  • 193
  • 1
    Is it possible `devtools.netmonitor.responseBodyLimit` does not apply to WebSocket frames in the WS Inspector? – Peter Becich Nov 20 '19 at 08:55
  • 1
    For WS I believe it is `devtools.netmonitor.ws.messageDataLimit` https://bugzilla.mozilla.org/show_bug.cgi?id=1565226 – Peter Becich Nov 20 '19 at 21:20
  • 1
    is there a similar thing in chrome? it seems to also truncate without warning. it just shows nothing when large – Dreaded semicolon Jan 05 '21 at 14:11
  • This works, but it's very slow. I'm not sure why its fast to write a large object to the console, but slow to view it in the network tab. – Micah B. Jan 08 '21 at 17:20
  • 2
    works perfectly after setting it to 0 thanks a lot! – enes islam Jun 16 '22 at 07:13
  • 1
    `devtools.netmonitor.requestBodyLimit` just to mention if your request is also huge. But 0 doesn't work for me in DevTools and it is still truncated. Copy as Curl rules. – it3xl Oct 27 '22 at 08:35
  • Figured I'd say this because it might save somebody a couple of seconds: when you change the setting to 0, the "Response has been truncated" immediately disappears, but Firefox will still be rendering the truncated response *until you refresh the tab.* – Daniel Kaplan May 19 '23 at 19:25
1

Update

See @Joni's answer for more info about it.

Original Answer

This bug already reported on https://bugzilla.mozilla.org and fixed in Firefox 61.

So update your browser to v61 (if you didn't already) and feel free to report the issue on bugzilla if it's still exists.

Mehdi Dehghani
  • 10,970
  • 6
  • 59
  • 64
  • 6
    As of Firefox 73, responses are still truncated to 1mb by default. The "fix" was to add a user preference to remove this limit. So Joni's answer is more useful here. – Antimony Mar 08 '20 at 18:35
  • This is still happening in 109. (latest version today) – julianm Jan 27 '23 at 14:11