To debug the X++ code from Visual Studio, follow these steps:
1. Open Visual Studio 2010.
2. Click Debug > Options and Settings. Expand the Debugging node, and then select the General node. Make sure that the "Enable just my code" is unchecked, and then click OK.
3. Click Debug > Attach to Process. Click Select, and then select Managed (v4.0) code and then click OK. Highlight Ax32Serv.exe in the list and then click Attach. Click Attach again to confirm.
4. If the Application Explorer is not already open, click the Application Explorer icon in the toolbar.
5. Open the object where the code is that you want to debug. For example, expand Classes, and then select the class that is running your service. Open a method by double-clicking.
6. Select the line you want to debug and press F9 to set the breakpoint.
7. Click F5 to run the code.
8. Verify the process stops at the breakpoint within the X++ code.
Regards,
Hossein Karimi
*This post is locked for comments