See the execution path of my program
I’m a new developer in a very complex project. I like to create a program that can plot the methods that is executing in the program to get a fast view of what is calling what. Of course I can debug the program but the best way right now is to write some code like this:
Code:
StackTrace s = new StackTrace();
CallAMettodThatDoesALotOfOtherCalls();
s.PrintAllCalledMethodsInAnEasyToReadWay();
Any tip on code/tool that manages that?
Re: See the execution path of my program
Re: See the execution path of my program
you can use Environment.StackTrace to get the current stack trace.
Code:
MessageBox.Show(Environment.StackTrace);
Re: See the execution path of my program
There's no built in way to achieve this. What you probably want is to run your application through a performance or memory profiler. They can (generally speaking) show you which function gets called by which other function.
Re: See the execution path of my program
I'll take a look at log4net and ANTS Profiler.