Note : I have created a simple list form for demo purpose and have overridden its Init method. Piece of code has been written in its init method and that code will be debugged.
To debug X++ code with attach process technique, following are steps.
Step1 ) Open Visual Studio as Administrator and X++ code for debugging.
Step 2) Go to AOT in Application Explorer and search your artifact. In my case I have artifact with name 'DemoForm' .
Step 3) For demo purpose I have overridden its init method.
Step 4) Insert a breakpoint on info code line by pressing F9 and click on Debug menu and select Attach to process option.
Step 5) Now select w3wp.exe process and click on attach button.
Note : Show processes for all users checkbox must be tick.
Step 6) Wait till all symbols are loaded and breakpoint dot color changed to red color.
Note : In case if you face any issue for instance yours symbols are not loaded properly then you may need to restart visual studio and build your project/solution.
Step 7) Now run your form from front end and you will be able to debug your code.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.