Fiddler Like Tool For Mac

Our support team over at Microsoft is really getting into cross platform development. Originally I set out to show how to set up Fiddler to capture network traffic on iOS, Android, and Windows devices, but it turns out that is well documented here. The fiddler docs do a good job of covering almost all platforms and Operating Systems.. However, one day I was working with a leaderboard hosted in Azure Mobile Services and trying to connect my Unity game to it. I noticed Fiddler was not capturing the network traffic when I was running the code from the Unity editor. So I decided to figure out how to do that and will share the details with everyone in this post.

Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and 'fiddle' with incoming or outgoing data. NetTool is a developer tool for monitoring and manipulating application-level network messages, particularly useful for debugging web applications and web services.. There are two components to NetTool: the HTTP Client, and the TCP Tun.

If you are running Unity on Windows then you can set up fiddler on the same Windows machine. If you are running Unity on MAC you will need another system to run fiddler on that is on the same network as the MAC. For example another Windows machine, or an instance of Windows running on Parallels. Either way you need a separate operating system to run Fiddler on. On the machine running Fiddler perform the following steps to set up Fiddler:

  1. Install Fiddler and choose the ‘Built for .NET 4 ‘ version
  2. Run Fiddler and choose (from the menu) Tools, Fiddler Options… Check these boxes in the HTTPS tab of the resulting dialog (and hit OK):
  3. Set these options in the Connections tab and then hit OK:
  4. Save the Fiddler options
  5. Note the IP Address and port of the proxy in the upper right corner of Fiddler by moving the mouse over the Online icon:
  6. Test the iPv4 address listed. If you have more than one IP Address like I do first ignore the iPv6 options and test the iPv4 options one by one. To test browse to http://ipaddress:8888, and you should see Fiddlers default HTTP response:

In this example the proxy configuration Uri will be “http://172.16.0.6:8888”. Save the specific Uri that fiddler is hosted on for the next step.

Fiddler Like Tool For Mac

Itool For Mac

The reason Fiddler will not capture network traffic from the Unity editor is because Unity is running a custom version of Mono. Fiddler can capture traffic from other processes because most processes will use the machines configuration for accessing the network which Fiddler automatically hooks into. Since Mono does not use the machines configuration for accessing the internet it won’t know to go through Fiddler and instead goes directly to the internet. The solution is to configure the Unity Editors version of Mono to go through Fiddler. We do this by modifying the machine.config in the mono installation directory for the Unity Editor as shown below for Windows and MAC OS.

NOTE: Make sure to undo these changes after you are done testing your network code in Unity. Otherwise the network code will always try to go through the Fiddler proxy. This will end in server not found errors if Fiddler is not running.

Configuring Unity for Fiddler on Windows

  1. Shutdown all instances of Unity
  2. Open Windows Explorer and navigate to the following directory:
    C:Program Files (x86)UnityEditorDataMonoetcmono2.0
  3. Right click machine.config and choose properties
  4. Choose the security tab and click edit. Add the account you are logged in as with read/write permissions and apply the changes. NOTE: You may need to take ownership of the file.
  5. Open machine.config in a text editor as Administrator.
  6. Add the following to the <system.net> section and replace ‘ipaddress’ with the correct IP from the previous step. Do not add <system.net> again, it is shown for reference on where to put the <defaultProxy> section.
  7. Save machine.config

Configuring Unity for Fiddler on MAC OSX

  1. Shutdown all instances of Unity
  2. Open Finder and navigate to Application/Unity, right click on the Unity.app file and choose “Show package content”
  3. Navigate to Contents/Frameworks/mono/etc/mono/2.0
  4. Open machine.config in a text editor.
  5. Add the following to the <system.net> section and replace ‘ipaddress’ with the correct IP from the previous step. Do not add <system.net> again, it is shown for reference on where to put the <defaultProxy> section:
  6. Save machine.config

NOTE: Make sure to undo these changes after you are done testing your network code in Unity. Otherwise the network code will always try to go through the Fiddler proxy. This will end in server not found errors if Fiddler is not running.

Conclusions

Fiddler and Unity are now set up so that Fiddler will catch the network traffic from code running in the Unity Editor. I hope the Unity developers writing network code will find this useful for testing their applications and working out the kinks for network services they might be connecting to. Until next time have fun coding!

Don’t forget to follow the Windows Store Developer Solutions team on Twitter @wsdevsol. Comments are welcome, both below and on twitter.

- Bret Bentzinger(Microsoft) @awehellyeah

Active2 years, 5 months ago

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?


closed as off-topic by ChrisF, nc4pk, mpy, Shekhar, MosesNov 12 '13 at 18:23

Download Fiddler For Mac

This question appears to be off-topic. The users who voted to close gave this specific reason:

For
  • 'Questions seeking product, service, or learning material recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve. Here are a few suggestions on how to properly ask this type of question.' – ChrisF, nc4pk, mpy, Shekhar, Moses
If this question can be reworded to fit the rules in the help center, please edit the question.

15 Answers

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

It allows detailed analysis and dumps.


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


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.


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.


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.

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:

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.)


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:


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)


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.


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


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:

Fiddler
  • 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.)


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

Fiddler Like Program For Mac

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.


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.



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.


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 macosmachttpweb-developmentsniffing or ask your own question.