Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i trace function in C#

E.g:

C#
Class A()
{
Button1_Click ()
{
Function A1()
}


Function A1()

{
Function B1()
}

Function B1()
{
Function C1()
}

Function C1()
{

}

}


How can i trace that which all functions were called when Button 1 was clicked?

We can use stack trace in function C1() to get all parent and child calling classes, but i need a method where all parent and child function are listed as soon as i click Button1.
Posted

1 solution

 
Share this answer
 
Comments
sujit0761 23-Nov-12 4:12am    
this wont help me to get function names in the sequence they are called.
Mohd. Mukhtar 23-Nov-12 4:15am    
If you enable trace it will show all the event and called method.
Enable trace and see the result
sujit0761 23-Nov-12 5:03am    
only events are tracked here. No information is traced
about the which function is calling which function.
Herman<T>.Instance 23-Nov-12 4:51am    
Do you mean you want to use Reflection in C#?
sujit0761 23-Nov-12 5:01am    
Not sure about the methods, i just wanted that i can trace which all are the calling functions and which all are the called function inside a button click.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900