• Home
  • How to use Dynatrace
  • RUM
  • Setup and configuration
  • Web applications
  • Troubleshooting
  • Capture HTTP sessions with Fiddler

Capture HTTP and HTTPS sessions for debugging using Fiddler

Fiddler is a free web debugging proxy that logs all HTTP/HTTPS traffic between your web application and the Internet. You can download Fiddler from the Telerik official site.

Capturing session data with Fiddler can be useful for troubleshooting scenarios such as:

  • When no user actions are captured for your application, the RUM JavaScript isn't injected, and the beacon signal isn't sent back.
  • When a JavaScript error caused by the RUM JavaScript affects your application.
  • In case of missing user actions, for example, a special interaction with the application.

You can upload exported Fiddler sessions to your organization's incident management system to facilitate issue resolution.

Create an HTTP session

You can use Fiddler to create an HTTP session of the monitored web application.

  1. In Fiddler, go to Tools > Fiddler Options > HTTPS.

  2. Select Capture HTTPS CONNECTs and Decrypt HTTPS traffic.

    Setting HTTPS options in Fiddler

  3. Go to File > Capture Traffic or press F12 to turn off capturing. Clear your browser's cache so that all cached items are removed and downloaded again.

  4. Go to File > Capture Traffic or press F12 to start capturing traffic again.

  5. Reproduce the problem scenario to demonstrate that the issue occurred within your application. Make sure the affected page is fully reloaded after restarting traffic capture.

  6. When done, go to File > Save > All Sessions.

  1. In Fiddler, go to Settings > Wi-Fi > Modify Network.

  2. Set Fiddler as the Wi-Fi proxy, as shown below. Add your machine's IP address as the Proxy hostname and the port that Fiddler listens on as the Proxy port.

    Setting Fiddler as the Wi-Fi proxy

    To find the port that Fiddler listens on, go to Tools > Fiddler Options > Connections. Use the value from the Fiddler listens on port field. To find your workstation IP and the proxy port via the command line, run ipconfig on Windows or ifconfig on Linux.

  3. optional If your application uses SSL certificates, add the Fiddler certificate to your device.

    • Go to Tools > Fiddler Options > HTTPS > Actions > Export Root Certificate to Desktop to obtain the Fiddler certificate.

    • Save the exported certificate, which is usually named FiddlerRoot.cer, on your Android device by going to Settings > Security > Install from SD card. You should then see the certificate in the USER tab of Trusted credentials.

      Fiddler certificate added to your device

  4. Go to File > Capture Traffic or press F12 to turn off capturing. Clear your browser's cache so that all cached items are removed and downloaded again.

  5. Go to File > Capture Traffic or press F12 to start capturing traffic again.

  6. Reproduce the problem scenario to demonstrate that the issue occurred within your application. Make sure the affected page is fully reloaded after restarting traffic capture.

  7. When done, go to File > Save > All Sessions.

Common mistakes when using Fiddler

Not enabling HTTPS decryption and restarting your application

Make sure you've selected the Decrypt HTTPS traffic check box in Fiddler's Settings > Wi-Fi > Modify Network. Also, do not forget to restart your application.

Otherwise, the body size of all requests in Fiddler is 0 bytes, as shown below:

Fiddler RUM debugging session - zero-byte requests due to not enabling HTTPS decryption

If Decrypt HTTPS traffic is enabled, the requests have an actual size, as shown below:

Fiddler RUM debugging session - requests have real sizes when enabling HTTPS decryption

Not clearing the cache and reloading the affected page

Make sure to clear the cache in your browser and then reload the page where the problem occurs. This allows the necessary files to reload for the Fiddler session and enables your organization's support team to reliably reproduce the issue.

For example, the following image shows only five requests triggered when you type in the Google search field. This is not enough to reproduce the issue locally.

Fiddler RUM debugging session - requests showing when cache not cleared

With the cache cleared and the page reloaded, you can see all the files needed to reproduce the issue and the five requests triggered when you type in the Google search field. This is enough for your organization's support team to reproduce the issue locally and speed up the support process.

Fiddler RUM debugging session - requests showing when cache is cleared

Alternatives to Fiddler sessions

Use Chrome DevTools to export an HTTP Archive Session

If you cannot use Fiddler to create a session, Google Chrome offers an alternative way to export a session for review.

Consider this alternative only as a last resort. It's easier to reproduce a problem with Fiddler.

To collect the HTTP Archive Session (HAR) file using Chrome DevTools

  1. Open Google Chrome and clear the browser cache.
  2. Press F12 to open Chrome DevTools.
  3. Go to the Network tab.
  4. Reproduce the problem to demonstrate the issue within your application.
  5. When done, select all sessions, right-click the blank space, and select Save as HAR with Content.
Use IE Dev Tools to export a NetXML session

If you cannot use Fiddler to create a session, Internet Explorer offers an alternative way to export a session for review.

Consider this alternative only as a last resort. It's easier to reproduce a problem scenario with Fiddler.

To export a NetXML session using Internet Explorer Developer Tools

  1. Open Internet Explorer 8+.

  2. Press F12 to open the developer toolbar.

  3. Clear the cache and domain cookies.

  4. Select the Play icon to begin the trace.

    Beginning the trace in Internet Explorer

  5. Reproduce the problem scenario to demonstrate the issue within your application.

  6. When done, select the Export icon (the disk icon with an arrow to the right) to save the file.