Canada
pawan.deep55@gmail.com

How to debug the Sandbox/Test environment in D365FO

How to debug the Sandbox/Test environment in D365FO

How to debug the Sandbox/Test environment in D365FO

Time required 20 minutes.

Steps

  1. Enable access for your IP address

    Go to lcs ->sandbox environment page. To connect to test environment RDP, you need to create Whitelist rule for your IP address enable access

  2. Connect RDP and open SSMS

    Connect to SQL server using Server name from LCS and add the prefix to SQL server name – servername.database.windows.netSSMS RDP

  3. Create a new query to test DB

    Below query will create a new user that will be used for debugging
    CREATE USER devtempuser WITH PASSWORD = ‘pass@word1’
    EXEC sp_addrolemember ‘db_owner’, ‘devtempuser’


    SQL

  4. Whitelist your IP address

    Select new query against Master DB
    exec sp_set_firewall_rule N’DEVNAME’, ‘IP’, ‘IP’ Whitelist IP

  5. Stop IIS, WWW service and Batch Service

    Open IIS and stop the service. Open run and enter services.msc and stop WWW and Microsoft D365 batch service

  6. Edit Web config

    Go to C:\AosService\webroot\web.config and save the original file somewhere else as backup. Modify 4 Keys as per the below screenshot.
    You can either comment original configuration or delete it and add new configuration of the sandbox environmentWEB config

  7. Start IIS and WWW services

    Start IIS and WWW service stopped in step 5. Don’t start batch service.

  8. Open the development environment AX URL

    If you get 503 unavailable error, go to CMD(as admin) and type IISRESET

  9. Debug

    Now sandbox environment is connected to your development environment. You can simply open Visual studio to add breakpoints to X++ object and attach w3wp.exe service to debug.

After following the above 9 easy to understand steps, you can now easily debug your sandbox environment. I hope this article helped you learn how to debug the Sandbox/Test environment in the D365fo development environment with minimal effort in D365 Fi- nance & operations AX. Don’t forget to share this article.
You may also want to see our article on How to remap workspace for Visual studio team services setup in D365 Finance & operations Development machine. You can find us on facebook.


Author: Pawan Deep SinghI am a D365 Finance & Operations Technical Consultant. I have dedicated this blog to write about all D365FO , ax2012 x++ related tips and tricks I came across in my career. For any query feel free to contact me via the contact section.

 

Comments: 5

  1. Arun garg says:

    You save my day

  2. Anurag nagarkoti says:

    You save my day. I love you my buoy.

  3. Akshay says:

    Thank you so much Pawan sir

  4. Himesh says:

    Thank you for such an informative article. Another way to do is to use JIT account as below https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/database/dbmovement-scenario-debugdiag

Add your comment