Get MS Dynamics Ax Call Stack in X++ Code

Sometimes it is really useful to know the Dynamics Ax call stack for debugging purposes. For example if you want to debug a scenario where user is doing something and getting weird results and you know which method is causing it but you are not sure when it is being called and moreover from which place in Dynamics Ax.

You can create a static method in Global / Info class or wherever you want and call it within the debugging method. When the method is called you will see a InfoLog about the call stack. Though this example shows you an InfoLog but you can use any destination for your output and optionally add time-stamp to it.

I hope this article helps you someway in debugging x++.

Feel free to post any comment / feedback here.

If you liked the story and want to see more of this kind of content, please follow our twitter handle @CursorRun or FB page @CursorRun
Default image
Rahul Sharma
Rahul is a technology enthusiast, solutions architect, trainer, and blogger, working on various Microsoft and open source solutions with more than 18 years of industry experience. He specially takes interest in designing enterprise applications, cloud integrations, IoT, and other architecture rich business solutions.

Leave a Reply

%d bloggers like this: