web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Can I debug UAT code in DEV in D365FO

(2) ShareShare
ReportReport
Posted on by 532
Dear team,
 
Can I debug UAT code in DEV in D365FO . For example, for specific reason I needs to debug a piece of code in UAT. 
In UAT, we can't debug it 
 
Kindly elaborate pls, how will I get the UAT code in DEV.
 
What is the best approach.
 
Kindly elaborate pls.
 
thanks!
Categories:
I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    306,280 Super User 2026 Season 1 on at
    Hi,
     
    The correct process for debugging UAT is described in this article: Debug a copy of the production database - Finance & Operations | Dynamics 365 | Microsoft Learn
  • Suggested answer
    Shaluma Profile Picture
    369 on at
    Hi,
     
    Yes, you can debug UAT logic in a DEV 
    To ensure your DEV environment matches UAT exactly, you must pull the specific code version from your source control system.
    Check the installed product version and package version in UAT, Find the corresponding release branch or changeset  in Azure DevOps, Open Visual Studio in your DEV environment. Connect to the correct branch and perform a Get Latest  to pull that exact codebase into your local metadata store. Run a full build of your models in Visual Studio.
    Move the UAT DB to DEV 
    Most UAT-specific bugs happen because of unique data configurations. You need the UAT database in your DEV environment.
     Go to the Lifecycle Services (LCS) project. Navigate to the environment details page for UAT. Go to Maintain > Move database and select Export database to create a bacpac file. Download the bacpac file from the LCS Asset Library.Use the SqlPackage.exe command-line tool on your DEV machine to import this bacpac file into your local SQL Server instance (replacing the existing AxDB). Run a full database synchronization from Visual Studio to align the restored database with your local code.
    Once your DEV environment has the exact same code and data as UAT,Open Visual Studio Run Visual Studio as an administrator.Open the specific element or class where the error occurs and insert your breakpoints. 
    • Go to Debug > Attach to Process, For IIS-hosted environments, attach to w3wp.exe,IIS Express environments, attach to iisexpress.exe, batch jobs, attach to Batch.exeOpen the D365FO browser link from your DEV machine, perform the action that caused the issue in UAT, and the debugger will hit your breakpoint. 
    If you cannot overwrite your DEV environment's code or database, you can use Trace Parser as an alternative: 
    Run a performance/execution trace in the UAT environment while replicating the bug. Download the trace file Open the trace file using the Trace Parser tool on your DEV machine to inspect the exact call stack, queries, and variable inputs without attaching a live debugger.
    https://d365ffo.com/2021/07/24/ax-d365fo-how-to-use-trace-parser-as-a-debugger/

    Thanks,

    If you found it helpful, please consider marking it as verified — it may be useful for others in the future!
     
  • Martin Dráb Profile Picture
    240,010 Most Valuable Professional on at
    Shaluma says that you must copy the database, but it's not necessary. You can connect to the UAT DB from DEV, as explained in the documentation page linked by André.
    If you're interested just in code and you don't need UAT data, you don't need either process.
  • Deepak Agarwal Profile Picture
    9,135 on at
    Sort answer is No, you can not debug UAT 'CODE' into dev. However you can connect UAT DB with your dev and the code available in DEV will execute against UAT.
     
    One of possible way is get the same code base on your DEV as UAT and try to debug. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 410 Super User 2026 Season 1

#2
Subra Profile Picture

Subra 390

#3
Martin Dráb Profile Picture

Martin Dráb 262 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans