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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Debugger enters into .cs code instead of staying in the xpp code

(0) ShareShare
ReportReport
Posted on by 2,334
Hi,
 
Version: 10.0.45 VHD, Visual Studio 2022
 
I'm trying to debug Sales Order Customer Prepayment Invoice posting code. But many times instead of staying in the xpp code, the debugger jumps into the .cs code.
 
For eg, CustVendSettle class exists in the AOT, instead of navigating in the xpp code, it enters into CustVendSettle.cs code.
 
How to prevent the debugger from entering the .cs code where the xpp code is available.
 
Appreciate any clarifications or tips.
 
Best Regards,
Categories:
I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    303,730 Super User 2026 Season 1 on at
    Hi MYGz,
     
    Please check if you have enabled the model containing the Sales order prepayment elements on the Debugging tab of the Options in visual studio.
    By default, not all models are enabled. 
  • Martin Dráb Profile Picture
    239,038 Most Valuable Professional on at
    There are two parts of the problem:
    • VS isn't able to debug the X++ for some reason. Most likely, it's because you haven't enabled it for the given module, as mentioned by André.
    • VS is configured to decompile CIL if it can't find symbols / source code. You can turn it off under Tools > Debugging > Automatically decompile to source when needed.
  • MYGz Profile Picture
    2,334 on at
    Thanks,
     
    I got this error after disabling,
     
     
     
     
     
  • Martin Dráb Profile Picture
    239,038 Most Valuable Professional on at
    Yes, if the source can't be found and you disable atutomatic decompilation, you'll get the Source Not Found window instead of the decompiled source code. That's exactly the difference between Automatically decompile to source when needed being enabled or disabled. As you see, this parts works as expected.
     
    The actual problem is why the source code can't be found. Not having the relevant package enabled for debugging was the most likely explanation, but it's not the only possible cause.
     
    Here are a few things to check (we can think about some more if needed):
    1. Make sure you have a project opened (in Solution Explorer) before starting debugging. My guess is that this is the problem.
    2. Recompile the model (SalesFormLetterLTM_Extension seems to be a customization).
    3. Untick Enable Just My Code under Tools > Options > Debugging.
    If you need more help, please tell us also how you start debugging.
  • MYGz Profile Picture
    2,334 on at
     
    I was debuggin with reattach to process. I don't have any projects open.
     
    Do we still need a project open if debugging standard code? Is there a way to debug code without creating any project or it's a requirement?
     
    I have put a breakpoint in standard code.
     
     
     
  • Martin Dráb Profile Picture
    239,038 Most Valuable Professional on at
    As far as I know, it's necessary - that's why I told you to do so. Please try it.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 658

#2
André Arnaud de Calavon Profile Picture

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

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 333 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans