Click here to Skip to main content
Sign Up to vote bad
good
See more: C#ASP.NET
how can i trace function in C#
 
E.g:
 
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 22 Nov '12 - 22:04
sujit07612.2K


1 solution

  Permalink  
Comments
sujit0761 - 23 Nov '12 - 4:12
this wont help me to get function names in the sequence they are called.
Mohd. Mukhtar - 23 Nov '12 - 4:15
If you enable trace it will show all the event and called method. Enable trace and see the result
sujit0761 - 23 Nov '12 - 5:03
only events are tracked here. No information is traced about the which function is calling which function.
digimanus - 23 Nov '12 - 4:51
Do you mean you want to use Reflection in C#?
sujit0761 - 23 Nov '12 - 5:01
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.
Mohd. Mukhtar - 23 Nov '12 - 5:15
Then you need to integrate .net profiler and the result you can display or write in some file.

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 OriginalGriff 296
1 Mohammed Hameed 183
2 Sergey Alexandrovich Kryukov 143
3 Santhosh G_ 108
4 Mayur_Panchal 98
0 Sergey Alexandrovich Kryukov 8,216
1 OriginalGriff 6,271
2 CPallini 3,528
3 Rohan Leuva 2,703
4 Maciej Los 2,234


Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 23 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid