Skip to content

Debugging

robbertvdijk edited this page Oct 8, 2021 · 6 revisions

Debugging

Since it is very hard to upload the javascript files after every change, it is easier to serve local files using Fiddler. Fiddler has the Fiddler AutoResponder to serve local files.

The to be debugged webresource needs to be deployed once to the D365 environment. Once the file is deployed, it is possible to point to a local file instead of the D365 environment file:

  • As preparation run in command line and copy the two generated lines:
      hso-d365 showFiddlerRule
  • Start fiddler
  • Select AutoResponder (right side)
  • Check 'Enable rules'
  • Click 'Add Rule'
  • In Rule Editor (bottom) add the two lines you copied in the first step. They look like below:
    • REGEX:(?insx).+\/yourpublisher_\/yournamespace\/(?'foldername'[^?])\/(?'fname'[^?].js)
    • C:\git\MyFirstProject\Webresources\dist\yourpublisher_\yournamespace\${foldername}\${fname}
  • Click 'Save'
  • In command line:
      npm run watch
  • Now refresh D365 and your local file will be served.

Microsoft Services

If your Microsoft services like Outlook and Teams are no longer working while using Fiddler, make sure you have configured the Fiddler options correctly.

Clone this wiki locally