Skip to content
← All tips

How to debug Dynamics 365 JavaScript without uploading it every time

Uploading the web resource, publishing and refreshing every time you change a line is painfully slow. A much nicer option is to make the browser load your local file instead of the one stored in Dynamics.

These days the quickest way is Local Overrides in Chrome or Edge. In DevTools, go to Sources → Overrides and pick a local folder. Then, in the Network tab, find your JavaScript file, right click it and choose Override content. From then on you edit the file (in DevTools or in that folder), reload, and the form runs your version.

If you already have Fiddler installed, its AutoResponder does the same thing and has been the go-to approach for years:

  1. Tools → Options → HTTPS, turn on Decrypt HTTPS traffic and trust the certificate.
  2. Rules → Performance → Disable Caching.
  3. In AutoResponder, tick Enable rules and Unmatched requests passthrough.
  4. Add a rule with REGEX:(?insx).+(?'yourjsname'[^?]*.js) and the path to your local file.

More than once I’ve had the JS not show up in Fiddler at all. It’s nearly always the browser cache, and ticking Disable cache in DevTools → Network sorts it out.

Remember to switch it off when you’re done. Nobody else sees your changes, so if you leave it on you end up testing code that only exists on your machine.

Share:LinkedInX

Did it help?

If you need help with this in your project, write to me.

More tips