More effective use of Fiddler AutoResponder

How does this official doc say, Fiddler can really streamline you web development when when it comes to D365 CE. The idea here is that you don’t need to deploy and publish your web resources during development as tool will automatically redirect browser request to local folder. That’s why it is called AutoResponder, as you may have guessed.

Official article is good enough and cover all steps required to setup your environment, so I’m now going to repeat them here. The only thing I want to add is… a few things actually!

Thing #1. Regular expressions

Article says that you can use EXACT match for each web resource. That means that you have to change or create new the rule each time you need to debug new file. Fortunately Fiddler has more options to use: https://docs.telerik.com/fiddler/knowledgebase/autoresponder. I’s always good to remember one thing then you decide to use REGEX:

Some people, when confronted with a problem, think “I know, I’ll use regular expressions.” Now they have two problems.

Jamie Zawinski

But we are lucky this time as my idol Scott Durow did all heavy work for us!

The URL Pattern:

REGEX:(?insx).+/WebResources/yourprefix_/(?’fname'[^?]*).*

Folder to match:

C:\yoursolutionpath\WebResources\yourprefix_\${fname}

You can skip WebResources part of the regex and map your prefix URL straight to your web resources folder if you want.  The only thing to mention here is that your file names and folder structure should match web resources virtual paths and names to use this approach. It’s always a good idea to keep things same so this should not be a problem.

Thing #2. Certificate errors

As D365 traffic is encrypted, the tool need to be able to decrypt it to make auto respond. To do the trick Fiddler acts like “man in the middle” (it definitely is mitm attacker!) between your browser and D365 web server and falsifies its HTTPS certificate. The downside of this may be different between environments and your machine setup, but most likely you will have connection problems with most of your apps then Fiddler is running. However, this can be treated as advantage as nobody will interrupt you when you are debugging!

Thing #3. Fiddler alternatives and final thoughts

Personally I will never Fiddler it if there are other options. It’s UI comes from somewhere in the 1990s and is complicated even for some developers. If something goes wrong it may be difficult to understand what. What if AutoResponder is not working? It may be HTTPS capture problem, of filters are not set up, or there is error in your regex and so on, but… you will never understand it from Fiddler output 😦

However, the tool does its job and does well. Time spent to master AutoResponde will pay for itself. And  this is for sure.

I tried to find something more lightweight but failed. There are some Google Chrome and Firefox extensions who say they can do same thick, but I didn’t manage to make them work. I think it’s because modern browsers forbid access file system for their extensions for security reasons. I believe auto respond should be an option for browser developer tools. May be now today…

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.