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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Why the debugger is not running for my class created in X++?

(0) ShareShare
ReportReport
Posted on by

Hello I have created by my colleague, Now whenever I am trying to run the debugger it is not running on this class. I started debugger on client, on AOS server also. But only one time the debugger ran for that class. After that it is not running.

I tried to run the Debugger with 2 other X++ jobs. It is working fine. I don't know what to do since yesterday I am trying but nothing is working. I removed all the breakpoints and again reinserted them. But again same result. Please help.

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    how you are calling your class???

    by creation of object or you trying to  call a static method using double colon (::)

    if the case if of static method, remember you cannot debug those.

    as alternative to such cases, is create a duplicate copy of same function and call them by object creation.

    it would be helpful, if you can explain more how you care calling/utilizing your class.

  • Community Member Profile Picture
    on at

    Yes I checked in main() we are creating a object of the class. below is the code:

    static void main(Args  args)

    {

       CXT_EmplyoeMasterImport        CXT_EmplyoeMasterImport;

       ;

       CXT_EmplyoeMasterImport =  new CXT_EmplyoeMasterImport();

       if(CXT_EmplyoeMasterImport.prompt())

       {

           CXT_EmplyoeMasterImport.run();

       }

    }

  • Community Member Profile Picture
    on at

    Sohaib on same class my colleagues is able to run the debugger. But not me.

  • Iulian Cordobin Profile Picture
    8,201 on at

    And you are placing the breakpoint on the line with the new call?

  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    Also, are you running directly the class from AOT, or through other calls or in a batch?

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,141 Super User 2025 Season 2 on at

    Hi Mahesh,

    Check if the user option ''Execute business operations in CIL" is enabled or not. This should be turned off for debugging x++ code.

    See also my blog:

    www.kaya-consulting.com/.../quick-note-on-debugging-in-ax-2012

  • Suggested answer
    syed baber Profile Picture
    11,633 on at

    Hi Mahesh,

    The debugging should work in your case, not sure why you are not getting the breakpoint to be hit inside your class. Try to write the breakpoint keyword inside run method of your class and see if it works or not.

    Thanks,

    Baber.

  • Suggested answer
    Martin Dráb Profile Picture
    237,972 Most Valuable Professional on at

    My guess is that your class runs on server tier and you don't have debugging allowed on AOS.

    If you gave us more information about the class, such whether it runs in CIL, on server or client tier, what you had tested etc., we wouldn't have to waste time with mere guessing.

  • Community Member Profile Picture
    on at

    Thanks all of you for your replies. Finally Debugger is working.

    Thanks to André Arnaud de Calavon, feeling relieved.

  • Verified answer
    Martin Dráb Profile Picture
    237,972 Most Valuable Professional on at

    Just to explain: you were using a wrong debugger. The X++ debugger isn't able to debug CIL. But if the code will run in CIL in production, you must test it in CIL as well, so don't think that ignoring CIL resolves all problems. Nevertheless it's indeed useful for some debugging scenarios.

    When you run code in CIL and want to debug, you have to use a CIL debugger, namely Visual Studio.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans