AX 2012: X++ breakpoints not hitting?

If you are not hitting the breakpoints you set in X++ code as expected then make sure that your code isn’t executed by the SysOperation Framework (formerly known as Business Operations Framework – BOF). If this is the case then you can force the AOS to debug your code in Dynamics AX Debugger by CLEARING the following check in Dynamics AX Development Workspace:

Tools >> Options >> Development >> Execute Business Operations in CIL

Moreover, make sure that Debug mode is set to:

When Breakpoint

Untitled

Actually AX 2012 executes business logic as compiled .NET CIL to run faster. You can also debug your X++ code in Visual Studio Debugger by opening your method’s xpp file in Visual Studio then attaching to Ax32.exe process (Tools >> Attach to Process). In this way you will be debugging your X++ code in compiled .NET CIL mode. You can find your method’s xpp file under the following location:

C:\Program Files\Microsoft Dynamics AX\6.3\Server\AxaptaDev\bin\XppIL\source\<TableName\ClassName>.<MethodName>.xpp

Now if your X++ code runs under SysOperations Framework, then it will be invoked by any of the following methods:

  • SysDictClass::invokeStaticMethodIL
  • SysDictTable::invokeStaticMethodIL
  • Global::runClassMethodIL
  • Global::runTableMethodIL
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s