Tuesday, January 15, 2019

D365FO Debugging

Follow the following steps to allow debugging in Dynamics 365 for Finance and Operations:

  1. On Visual studio go to Dynamics 365 > Options > Debugging

  2. On Visual studio go to Debug > Options > Debugging > Symbols
  3. Set your project as startup project by right clicking on project and selecting 'Set as StartUp Project'
  4. Set the element which you want to debug as startup object by right clicking on element and selecting 'Set as StartUp Object'
  5. Set a breakpoint in first line of code snippet which you want to debug.
  6. You now have two options:

    Option 1:
    • Start the project directly from Visual Studio by clicking on 'Start' button on Action pane or use shortcut F5. It will build the project and run on a new browser instance.
          Option 2:

    • Build your project (shortcut Alt+b,u)
    • On internet explorer login to your environment, in case if already logged in refresh the tab.
    • Attach 'w3wp.exe' process by clicking on Debug > Attach to process... (or use shortcut ctrl+alt+p). On the opened form check the 'Show processed from all users'  and select 'w3wp.exe' from the list and click Attach button. It will attach services need for debugging.



Your breakpoint will hit once you run your target form/class/report. :)



No comments:

Post a Comment