I found this answer wanting to do this, and none of the answers here suited me because I needed to dump HTTPS response bodies, much like OP. So, for those who land here like I did, here's what I found.
I eventually landed on mitmproxy, which isn't a Firefox extension, but does accomplish the goal of logging all Firefox traffic. It's all Python, so I installed it with
pip install mitmproxy - use a package manger if you like.
Started it up with
mitmproxy for initial setup/debugging, and then used
mitmdump to dump the stream once I had it working and refined.
I just set Firefox to use
127.0.0.1:8080 as the proxy server (8080 being mitmproxy's default port), and I saw all my Firefox traffic coming through mitmproxy. To enable HTTPS traffic, you have to accept the certificate that mitmproxy creates - with the proxy set up, just go to the "magic address" of http://mitm.it in Firefox, click the "Other" button, check the boxes to trust the cert, and hit OK.
To dump the unencrypted response body, I had to use a very simple inline script:
from libmproxy.model import decoded
def response(context, flow):
with decoded(flow.response): # automatically decode gzipped responses.
with open("body.txt","ab") as f:
Gist here - download it as
save_response.py and use it with
mitmdump -s save_response.py. Response bodies will start piling up in
mitmproxy also has a number of useful filters that you can specify to mitmdump to grab just what you need.