Total Pageviews

Search This Blog

Wednesday, April 9, 2008

Debugging AX via .Net Business Connector

In this blog, I will take you through a step-by-step debugging approach using .Net Business Connector.
Note: The .Net code is extracted from a custom solution which we built to hear to MSMQ messages and then logon to AX and pass on the message to an AX API.
Step1:
Launch Vision Connector Test Application (Start => Programs => Vision Connector => Vision Connector Test Application).
Note: Make sure message queues are set properly in Send queue and Receive queue.






Step2:
Launch TestVisionConnector.sln (.Net Solution) using VS 2005. Insert a breakpoint by going
to the event VICO_NewMessageXML and press F9 key.

Step3:
Press F5 key inorder to initiate the debugging process. Now, a window will open and the status of the title bar for the project will show Running.









Step4:
Launch Microsoft Dynamics AX and Navigate to AOT/Classes/ VCMSMQMgt as shown below:
Tip: Press “Ctrl + D” key to launch AOT (Application Object Tree) in AX.










Step5:
Open Class VCMSMQMgt and go to the method NewMessageXML and press F9 key to insert a breakpoint.







Step6:
Launch Debugger in AX by going to Tools => Development tools => Debugger as shown below:











Step7:
This should open a new Debugger Window as shown below:








Step8:
Start the communication flow by sending a request from the test application i.e. by pressing the “Send Request to Queue” button shown below:














Step9:
Automatically, the breakpoint will be hit in TestVisionConnector application. (.Net solution).









Step10:
Step over the code line by line by clicking the F10 key till the execution reaches the following line:
axobj.Call("NewMessageXML", InXML.xml);










Step11:
Now, press F11 key to step in to AX Debug environment.









The above steps completes one cycle of debugging through the entire communication chain between Vision connector test application to Dynamics AX routing via .Net code.

2 comments:

Fenridal said...

See Please Here

Anonymous said...

nice article. I would love to follow you on twitter.