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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Can any one of you please explain me the proper way to debug X++ code?

(0) ShareShare
ReportReport
Posted on by 220

Like which is the best place to keep a breakpoint and where not to keep it and how to change variable values and check.

P.S. I am new to AX and would be thankful for the help:)

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Florian Hopfner Profile Picture
    2,457 on at
    RE: Can any one of you please explain me the proper way to debug X++ code?

    Take a look at Using the Microsoft Dynamics AX Debugger [AX 2012] and Tips & Tricks around debugging X++ code in Dynamics AX. If you have specific questions, you should create separate posts for each in the Development / Customization / SDK forum.

  • Verified answer
    Vilmos Kintera Profile Picture
    46,149 on at
    RE: Can any one of you please explain me the proper way to debug X++ code?

    The "proper" way is done by not breaking a couple of simple rules:

    - Do not enable global breakpoints and server-side debugging in a Production environment. It negatively affects performance up to 20%.

    - Do not put breakpoints in a Production environment even for jobs or things running on client side, under some circumstances it could crash your AOS instance

    - Do not use hard breakpoints in X++ code

    - Debug class calls are OK during development and testing phase, but do not leave them in Production blogs.msdn.microsoft.com/.../debugassert-in-x

    Other than these, debugging is pretty straightforward both in Debug.exe and in Visual Studio. Altering variable values during the execution is possible in the first scenario (VS type conversions are a bit funky), and also you could drag the execution cursor to a later or previous step if desired.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Community Member Profile Picture

Community Member 2

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans