Hi Jana,
Main key is to debug the process.
Before debugging you need to make sure that:
- Debugger is installed
- Debugger is enabled in your client
- Debugger is enabled in your configuration utilities
Refer to this link on how to check on enabling debugger
msdn.microsoft.com/.../aa569665.aspx
There can be various scenarios , refer to this link which explains about how to debug in different types of situations like debugging X++ code, Batch jobs, Reports, EP , Managed code ,CIL code
msdn.microsoft.com/.../gg860898.aspx
Sometimes it is helpful to disable "Enable debugging in CIL" checkbox from user option to debug a process always in X++.
Now from your question it looks you want to debug X++ code when running a process. In this case check the form object in AOT then go to design and check the menu item button, then you can trace the class called by menu item and then you can put breakpoint in the main method of that class to debug and understand what is happening in the system.
Menu item buttons are always not the case, there can be code written on form, tables too so you have to first drill down and see what you want to debug.
Hope this helps.
Thanks,
Rachit Garg