Hi everyone,
could anyone tell me how to debug Class : ExchangeRateProviderCBRF_RU.
Hi everyone,
could anyone tell me how to debug Class : ExchangeRateProviderCBRF_RU.
Hi Vladislav,
According to the documents of Microsoft:
Debugger
Microsoft Dynamics AX includes a powerful stand-alone debugging tool for
X++ code. Use the Debugger to debug X++ code running on the:
• Microsoft Dynamics AX Client
• Microsoft Dynamics AX Object Server (AOS)
NOTE: Managed code and X++ compiled into Intermediate Language (IL) are
debugged using the Visual Studio debugger. This topic will be covered in the
Visual Studio Integration chapter of the Development III course. This topic only
covers debugging standard X++ code.
Use the Debugger to:
• Run a program to a certain point and then stop at a defined
breakpoint.
• Step through the program one statement at a time.
• Display the call stack with code line numbers.
• Watch specific variables and modify their values during execution.
• Track messages being sent to the infolog.
Debugger
Microsoft Dynamics AX includes a powerful stand-alone debugging tool for
X++ code. Use the Debugger to debug X++ code running on the:
• Microsoft Dynamics AX Client
• Microsoft Dynamics AX Object Server (AOS)
NOTE: Managed code and X++ compiled into Intermediate Language (IL) are
debugged using the Visual Studio debugger. This topic will be covered in the
Visual Studio Integration chapter of the Development III course. This topic only
covers debugging standard X++ code.
Use the Debugger to:
• Run a program to a certain point and then stop at a defined
breakpoint.
• Step through the program one statement at a time.
• Display the call stack with code line numbers.
• Watch specific variables and modify their values during execution.
• Track messages being sent to the infolog.
To turn debugging off, you can visit Tools > Options, and select the Developer
tab. In the Debug field, select None. When you set a breakpoint in code, this field
will automatically be set back to When Breakpoint.
Breakpoints are only recognized on the tiers (client or server) that have been
configured to recognize them. Code running on the client tier will always stop at
a breakpoint in a user's session, when the user has debugging turned on. Code
running on the server tier will only stop at a breakpoint when the AOS has
specifically been configured to enable breakpoints. This is a setting on the
Microsoft Dynamics AX Server Configuration Utility.
The Debugger can display up to six information windows. The windows display
detailed information about the current state of the executing code while you are
debugging. The information windows available are as follows:
Window | Description |
Code | Displays the X++ code currently being debugged. The red dot indicates where the breakpoint is inserted. The yellow arrow indicates the line that is being executed. The arrow can be dragged to a different line of code so that code is either re-executed or skipped. |
Variables | Displays the value of the variables. Modified variables appear in different colors to indicate change. Users can alter the value of variables in the debugger to see how the program would run under different conditions. |
Call Stack | Indicates which method is currently being debugged. Double-clicking a method further down the stack will take the Code window to that method. |
Watch | Contains a user-defined range of variables. The variables can be dragged and dropped from the Variables window or the Code window. |
Breakpoints | Displays the list of currently defined breakpoints with their enabled status and line number. |
Output | Displays separate views of text written to the window from X++ code and kernel code. These views organize information sent to the Output window. |
HINT: The Microsoft Dynamics AX Debugger Help Guide can be accessed
directly by pressing F1 in the debugger. This guide lists keyboard shortcuts that
make it easier and faster to use the debugger.
Use the toolbar located above the Output window to navigate through the code
and perform other actions.
Moving the pointer over these buttons reveals the button's function and a
keyboard shortcut.
The more generally used buttons are described in the following table, together
with the keyboard shortcut:
Button | Keystroke | Description |
Go | F5 | Continues the execution. |
Stop Debugging |
Shift + F5 | Terminates the execution at the current line. |
Insert/Remove Breakpoint |
F9 | Inserts or clears a breakpoint. |
Enable/Disable Breakpoint |
Ctrl + F9 | Enables or disables a breakpoint. |
Remove all breakpoints |
Ctrl + Shift + F9 |
Clears all breakpoints. |
Step Over | F10 | Steps to the next line of code in the current method. |
Step Into | F11 | Steps into the current line if it contains a method call. |
Step Out | Shift + F11 | Steps out of the current method. |
Run to Cursor | Ctrl + F8 | Continues the execution until reaching the location of the cursor in the Source window. |
By default, for performance reasons, debugging in code that is executed on the
AOS is disabled. During development it is often required to debug this code. The
following procedure will enable code run on the AOS to be debugged.
1. Close the Microsoft Dynamics AX client
2. Click Start > Administrative Tools > Microsoft Dynamics AX
2012 Server Configuration
3. Click Manage > Create Configuration
4. In the Configuration Name, enter a name, for example AOS_Debug.
5. Click OK
6. Check the box Enable breakpoints to debug X++ code running on
this Server
7. Click Apply
8. Click Yes to restart the AOS service. This may take one or two
minutes.
9. Click OK to close the Server Configuration Utility.
10. Restart the Microsoft Dynamics AX client.
Vladislav, I already gave you the link in my first reply.
Hi Vladislav!
Check this link docs.microsoft.com/.../debugging-in-microsoft-dynamics-ax-2012
Hi Martin , the class is used in managed code (CIL). Could you tell me how to debug with Visual Studio or give me link with example. Thank you
You should be able to debug it in the same way as other classes - see Debugging in Microsoft Dynamics AX 2012 if you're not familiar with it.
Most importantly, make sure you're using the right debugger. I assume the class is used in managed code (CIL) - if it's the case, you need Visual Studio and not the X++ debugger.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,252 Super User 2024 Season 2
Martin Dráb 228,089 Super User 2024 Season 2
nmaenpaa 101,148