Wednesday 5 September 2018

Debug your code in D365FO - Part 2



As we already discussed about the first technique of debugging X++ code. Now lets proceed further on with second technique where we will be debugging code by attaching the process in Visual Studio.

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.

Connect and upload in azure blob with azure key vault using x++

 Today, I will be sharing details about file upload in azure blob using azure vault that includes pre requisite and code snippet used to it....