Link to home
Start Free TrialLog in
Avatar of Easwaran Paramasivam
Easwaran ParamasivamFlag for India

asked on

Profiler for .NET like SQL profiler?

In SQL we run profiler to identify what are the SPs are being hit and what parameters are passed to the method.

Likewise is there any easy way to identify .net application what are the methods are being hit and what parameters are passed to the methods?

By debugging the application and using Log file writing in each method we could accomplish this. Other than that any tool or any other method is in place? If you know please do share.
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Hi  EaswaranP;

When debugging your application you can hover over a variable to see its value. If you want to know who called the current function you are in open the Call Stack window and it will have all the methods that were called and if you double click on a method and hover over a variable you will see the value as it was before the next function was called.
Same as the SQL profiler is provided only in higher end editions of SQL Server, there is a code profiler in the Premium and Ultimate editions of Visual Studio, but not in Express and Professional.

In these, as suggested by madgino, your only solution if to use tracing. You have to build the whole thing yourself however, and doing so for a complete application can be a pain.
Avatar of Easwaran Paramasivam

ASKER

http://msdn.microsoft.com/en-us/library/bb386420(v=vs.100).aspx speaks about asp.net application. But my applications are Windows Application, WPF applications.
When you see System.Diagnostics somewhere, you  are dealing with the framework debugging features. It works in any kind of application. So System.Diagnostics.Trace also works in Windows and WPF applications.

You can also use System.Diagnostics.Debug, an alternative class to do the same thing. Except for a couple of properties and methods, Debug and Trace are interchangeable.
ASKER CERTIFIED SOLUTION
Avatar of madgino
madgino
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks.