Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Use Fiddler Auto Responder to replace a JavaScript web resource with a local file while you develop and debug it. This approach lets you test changes without uploading and publishing the web resource to your model-driven app each time. Follow these steps to configure Auto Responder.
Install and configure Fiddler
Download and install Fiddler.
Open Fiddler. From the menu bar, go to Tools, and then select Options.
Select the HTTPS tab in the dialog box and check the Capture HTTPS CONNECTS and Decrypt HTTPS traffic checkboxes so that Fiddler captures and decrypts the HTTPS traffic.
Select OK to close the dialog box.
Note
If it's the first time you're enabling this setting, Fiddler prompts you to install a certificate. Install the certificate and restart Fiddler so that the new settings take effect.
If you ran Fiddler in the past and get a NET::ERR_CERT_AUTHORITY_INVALID error, in the HTTPS tab, click the Actions button and choose Reset All Certificates. This action also presents prompts to install new certificates.
Configure Auto Responder
Open the page in the model-driven app that you want to debug.
Start the Fiddler trace capture by clicking the Capturing button in the bottom left corner.
Note
To capture HTTPS traffic only from a particular host, on the Filters tab, in the Hosts area, select Show only the following Hosts from the -No Host Filter- drop-down menu and enter the list of domains from which you want to see traffic, separated by semicolons. For more information, see Filters reference.
Perform any operation necessary to load the script you're testing. You can stop the capture by clicking the same Capturing button again.
Select the trace log sessions from the left pane and search for the file you want to set up the Auto Responder for.
For example, if the code you want to debug is in a JavaScript web resource named
new_testscript.js, use the Find button to open the Find Sessions dialog box and search for the name of the web resource.
You see the rows that match your search criteria highlighted in the left pane.
Select that row. In the right pane, select the Auto Responder tab.
In the Auto Responder tab, select the Enable rules and Unmatched requests passthrough check boxes.
Ensure that you still have the session related to your target file selected and then select the Add Rule button in the Auto Responder section. This action adds a new entry into the rules table.
When the rule is selected, the Rule Editor at the bottom has the top row populated with the Session URL related to your file and prefixed with a string like
EXACT:.You can then edit the string to match to simplify it. With web resources, the URL contains generated values in the URL or in a query string to ensure that the latest published version is included in the response. You probably see the
EXACTvalue looks something like this:EXACT:https://<org URL>/%7B636556138760000160%7D/WebResources/new_testscript.js? ver=-1229805553You can simplify this value by removing the generated values.
/WebResources/new_testscript.jsLeave the bottom row blank. Type the path to your local file on your disk in this bottom row and Save.
These steps configured Fiddler to listen to the requests and respond with the local file instead of passing the request over the network.
Update and test your code
- Apply changes to your local file.
- Start Fiddler trace capture again. Go back to your browser and hard reload the page with an empty cache.
- In the browser developer tools, check that the file you receive is the local one.
- Continue updating your code and repeating this process until you get the results you want.