Monday, June 28, 2021

How to debug spfx solution in production site?

 Ans:-

The process of what you can do when something happens in an environment where your solution is already deployed is the following:

  • Spin up your local development environment with: gulp serve --nobrowser
  • Append the following to the URL: ?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js
  • Click on Load debug scripts
  • Open the page and start debuggingDebugging your local files instead of the bundle
  • Doing it this way, you are actually loading the web part from your own local instance without impacting anyone else which is using it. Plus, it allows you to also test out some environment specific things, which you might not have taken into account in your dev./test environments.

No comments:

Post a Comment