247

In previous jobs when I've worked on a Windows machine, I've used Fiddler for viewing HTTP transactions and debugging.

I'm specifically looking to monitor the HTTP transactions for an ajax site I'm working on to verify that the site is doing what I expect. Rewriting HTTP (as provided by Fiddler) is a nice-to-have, but not essential.

Can anybody recommend something similar for use on a Mac?

6
  • 4
    This has been closed, but still exists, so needs to have added: Fiddler is now in alpha for the mac os.
    – boomhauer
    Jan 28, 2014 at 1:44
  • 1
    i don't know why this would be closed? it has 113 upvotes. it's not like this was an ask on stack overflow.
    – genxgeek
    May 20, 2015 at 5:17
  • Read the rationale directly above these comments -- "Questions seeking product, service, or learning material recommendations are off-topic" May 20, 2015 at 13:57
  • Fireup Fiddler on nearby Windows machine and configure your MAC to proxy over Windows machine and voila! everything on your MAC will be seen on Windows :)
    – Korayem
    Nov 1, 2015 at 23:19
  • 2
    FYI, for those who got really excited reading @boomhauer 's comment: Fiddler for OSX is still in Alpha, having last been touched in July 2013, it requires the Mono framework (so it's basically just a wrapper for the Windows version, not actually re-factored for Cocoa), and the release has the note: "Mac Note: The WinForms framework on Mac is almost unusably buggy. Your best bet is to run Fiddler inside a Linux or Windows Virtual Machine and point the Mac's proxy settings at that."
    – Anthony
    Mar 9, 2016 at 0:20

15 Answers 15

136

Use Chrome and navigate to chrome://net-internals/

It allows detailed analysis and dumps.

7
  • 2
    Nice. Any idea when that was added to chrome? Nov 28, 2011 at 15:54
  • 2
    Nope, sorry. I used to work with Fiddler on Windows, but moving to a Mac I stumbled over net-internals while looking for hidden chrome features. Dec 9, 2011 at 13:11
  • 5
    this tool seems "neat" but how can you see the entire request payload (i.e. GET request headers?)
    – genxgeek
    May 20, 2015 at 5:25
  • AFAIK, this does not offer a way to modify the data in transit such as Fiddler does with FiddlerScript, AutoResponder, and breakpoints. Good tool but for different purposes.
    – jacobq
    May 20, 2015 at 17:20
  • 37
    this tool only seems to capture chrome traffic. Is there any way to use this tool to capture http traffic from/to a a particular process?
    – morpheus
    Jan 19, 2016 at 22:58
72

I found Charles Proxy. It's much closer to the functionality of Fiddler. It's not free, but it may be worth the price.

8
  • Just curious: did anyone here ever use it?
    – Arjan
    Sep 18, 2009 at 11:07
  • I used it for an hour or two after I found it. The trial version has some nag screens and a 30 minute restriction, but I don't think those are unreasonable. I was looking for specific headers in the HTTP response and I was able to see these easily. Sep 18, 2009 at 18:11
  • 1
    The nice thing about Charles is that it is available for both OSX and Windows so if you go back and forth frequently it's a nice common tool. May 2, 2013 at 23:20
  • 5
    An important functionality that charles (and fiddler and maybe webscarab) provide is the ability to intercept and modify requests, including https decryption. Aug 9, 2014 at 18:36
  • 1
    I use Charles to decrypt Instagram, Facebook and other mobile apps https requests. Just point iPhone Proxy to Charles and I'm able see how they send data and what data they send! May 26, 2015 at 0:11
40

I've used mitmproxy for intercepting HTTP traffic. It's a great tool and you can use it for debugging mobile devices as well or any operating system for that matter.

3
  • LOOVE THIS! Incidentally, for all the script kiddies, in case you write code in something other than JS sitting in the browser, this thing is THE ticket.
    – Shanerk
    Jun 22, 2018 at 20:01
  • 1
    NB: Requires Xcode 11.1
    – Leo
    Nov 27, 2019 at 11:38
  • is that safe to use? downloading a lot of things when i type the install command. i wonder why
    – Emil
    Jan 14, 2022 at 18:13
28

My favorite mac app for monitoring traffic is HTTPScoop, I detail that as well as using tcpdump from the commandline in this post I blogged last year.

8
  • If you happen to know Wireshark (or the less powerful Cocoa Packet Analyzer): can you compare HTTPScoop to that?
    – Arjan
    Sep 18, 2009 at 11:09
  • 1
    Cocoa Packet Analyzer is quite simple too. However, I never figured out how to filter some specific port or server IP address, and then see both the request and reply... That's easily done in Wireshark. (Just type smtp as display filter to see all traffic that uses the SMTP protocol. Or tcp.port == 25 to get all traffic to port 25, and its responses. Or http and ip.addr == xxx to get all HTTP traffic to and from some server.)
    – Arjan
    Sep 19, 2009 at 8:24
  • 1
    httpscoop looked promising, unfortunately it seems to be abandoned and I was unable to capture localhost traffic on 10.9.2. The last release dates back to 2009 and the website touts ans upcoming v2.0 which doesn't seem to be forthcoming :/
    – Jean
    Mar 26, 2014 at 10:24
  • 1
    I tried to use this app, it's horrible compared with fiddler. I want to capture all traffic and all ports all interfaces not port 80 on localhost. I tried to add the ports I wanted thru preferences (with scoop off). This did not help me as the things I wanted to monitor were on two different interfaces e.g lo / en0
    – KnuturO
    Nov 25, 2015 at 16:06
  • 3
    Link to blog not working :(
    – Reg
    Oct 18, 2017 at 14:39
19

Not what you asked, but in Firefox the Live HTTP Headers add-on is all I need if I want to edit and re-play requests, including changing the URL and the HTTP method.

Live HTTP Headers

In Firebug, the Network Monitoring shows all requests and responses. Likewise, in Safari the Resources pane of the built-in Web Inspector covers most of my needs as well. (Enable the Web Inspector through the preferences: Show Develop menu in menu bar.) Chrome and Firefox have similar tools.

When things get more complicated, I fire up my Wireshark packet sniffer. However, unlike Fiddler, Wireshark does not let you change the data, and does not support things like auto responders, like Fiddler apparently does.

For Wireshark, see Hyper Text Transfer Protocol (HTTP) for some generic HTTP capturing information, and HTTP Packet Capturing to debug Apache, for some example display filters. (You may want to set the capture filter to "port 80", to show all requests to that port, and responses from that port. Or, to limit to some server, use capture filter "port 80 and host www.google.com".) Like:

# Show only 404: page not found
http.response.code == 404

# Show only certain HTTP methods
http.request.method == "POST" || http.request.method == "PUT"

# Show only javascript
http.content_type contains "javascript"

Note that Wireshark can decompress gzip or deflate encoded (compressed) things on the fly for you. That makes things much easier to read as most web servers will compress the data they send to a browser.

(As for auto responders: the excellent JS Bin has a short video on how to use it to debug Ajax requests. If you don't know JS Bin, then first view the introduction video.)

3
  • +1 for Firebug -- I love their network monitoring tool
    – Josh
    Sep 21, 2009 at 23:15
  • I tried it but I couldn't make a new request to a different url (in the same domain) and couldn't find how (from a GET to a POST for example).
    – Purefan
    Nov 18, 2014 at 8:54
  • @Purefan, without more detail we cannot help; it works for me, see the screenshot I just added. You may have run into mozdev.org/bugs/show_bug.cgi?id=25831
    – Arjan
    Nov 18, 2014 at 19:46
7

In addition to Charles (already mentioned), I also like the HttpFox add-on for Mozilla Firefox. Like Charles, you can use it on both Mac and Windows. It's lighter-weight than Charles because it lives in the browser, useful for quick troubleshooting. Here's some information from the HttpFox page:

HttpFox monitors and analyzes all incoming and outgoing HTTP traffic between the browser and the web servers.

It aims to bring the functionality known from tools like HttpWatch or IEInspector to the Firefox browser.

Information available per request includes:

  • Request and response headers
  • Sent and received cookies
  • Querystring parameters
  • POST parameters
  • Response body

And, a screenshot:

Screenshot of HttpFox add-on for Mozilla Firefox

1
  • This is not compatible with the newer versions of Firefox (Firedox 57 and Firedex Deveolper Edition 57)
    – Promather
    Jan 14, 2018 at 1:43
6

Not a proxy, but it does help in debugging HTTP:

Simply start a scan on the interface you're going to have the HTTP traffic on, execute the traffic and then stop scanning and type "HTTP" as the filter string. You will then be able to inspect all the packets of the HTTP conversation. With the Packet Detail view open you can open the HTTP section and it will stay open between packets.

It's a great tool to have and it doesn't require you to change the browser proxy. On the other hand it cannot help with HTTPS traffic since that's encrypted. (Although it can decrypt SSL connections that use RSA)

3
  • 2
    Just an update: Wireshark is pain on OS X. It requires X11, which is no longer included in OS X, so you end up using some 200MB of disk all together. Aug 17, 2015 at 19:54
  • 2
    Just an update on @MarkoBonaci update, Wireshark 2.x now runs great on OSX ditched the need for X11.
    – squareborg
    Dec 1, 2015 at 15:10
  • @MarkoBonaci - you should just install with qt instead.
    – arcseldon
    Feb 1, 2016 at 16:47
5

I'm late but - I use Paros Proxy. It's in Java, so, cross-platform. Though if you would prefer for it to be packaged as an app, there's one here at the bottom.

4

Don't forget Burp Suite. They have a free version. It's cross platform. http://portswigger.net/burp/

2

It seems that the free GlimmerBlocker can do part of the trick.

Of course it can block all kind of content, and transform responses before the browser receives them. But it can in fact modify both requests and responses. And though not true debugging, it also offers logging. So, it might suit basic needs:

There are 4 types of scripts running inside GlimmerBlocker, and some objects are only defined for some of the script types:

  • global proxy: this sets the global proxy settings, and can test for e.g. location name, AirPort network.
  • request modification: this can change the requested URL, send back a redirect response to the browser, or send text/html back to the browser.
  • keyword expansion. [Safari-only, AvB]
  • transform: modify the response received by the web-server before it is sent back to Safari [or any browser that is set up to use the proxy provided by GlimmerBlocker, AvB].

(One can also use it to include various Greasemonkey scripts in the received response, without using a Greasemonkey add-on, like to block Flash without installing any add-on.)

1
  • GlimmerBlocker is an interesting tool, but different than what I'm looking for. I've re-edited the original description to remove the rewrite examples and clarify that I'm merely looking to monitor the traffic and not transform it. Jan 7, 2010 at 16:46
2

You can easily configure Fiddler for Mac using Parallels as per instructions on their site.

The only caveat is that you have to manually configure your Network settings to point to the IP address of the VM but not really that big of a deal.

5
  • 8
    I wouldn't call that "easily" - it requires buying and installing a vm server and an entirely different operating system. Aug 15, 2013 at 17:08
  • I have 5 entries in this tooltip and only one of them is IPv4 format. Which one should I pick? :) May 15, 2015 at 6:06
  • 1
    You can use free virtualization software such as Oracle's VirtualBox along with a VM from modern.ie if you want to run a Windows OS (after 90 days it needs to be reset) -- not too tall of an order for someone with the skills needed to run an advanced web debug proxy
    – jacobq
    May 20, 2015 at 17:16
  • If this question was open - someone should mention Fiddler for Mac - telerik.com/download/fiddler using Mono framework... Oct 12, 2015 at 7:23
  • And it is not working for me in macOS
    – tom10271
    Jan 10, 2018 at 2:14
1

jMeter might also be helpful; it's designed for testing load performance on web servers, but it might still do what you need. jMeter is written in Java, so you can download a .jar file that will run on Mac, Windows, or Linux.

1

Cocoa Packet Analyzer is very helpful.

2
  • 4
    How is it helpful? A cliffs notes version of that would be hugely helpful
    – Journeyman Geek
    Jun 25, 2012 at 14:04
  • cocoa packet analyzer was able to successfuly capture HTTP trafic but it doesn't do request/response reconstruction :(
    – Jean
    Mar 26, 2014 at 10:25
1

If you're dealing with app traffic or third-party API integrations that go over the public internet, you should try Runscope (of which, full disclosure, I am a co-founder). It captures HTTP requests to any URL, gives you a nice stream view for debugging and makes it easy to share individual requests with others.

0

You could also try APIKitchen. It helps you in debugging and testing HTTP APIs and any requests in general. It also has an offline version for testing in your internal networks. No installation necessary.

Not the answer you're looking for? Browse other questions tagged .