views:

251

answers:

3

I've just started work on an existing .net application with about 40 active projects. While familiarizing myself with the project, I find myself constantly stepping through the application just to learn the structure and logic flow. It would make this process so much easier if I could let the application run and log every method call and review the log afterwards. I know I can add Debug.WriteLine or Trace.WriteLine statements, but adding those statements to most methods in 40 projects sounds like overkill. Are there any good alternatives to this approach?

edit: CLR Profiler introduced me to the appropriate keyword 'call graph' which led me to a duplicate question

+2  A: 

The CLR Profiler can give you the stack traces you are looking for.

heavyd
+1  A: 

Or you can use something like PostSharp to add the logging automatically for all the methods.

Cohen
+2  A: 

You might check out RedGate ANTS. The purpose of ANTS is performance profiling, but the profiler does give you a very detailed view of what the profiled application is doing, lets you slice and dice the callstack and also lets you jump over to Visual Studio. It's a bit spendy, but well worth it.

JP Alioto
++ for "spendy".
Mike Dunlavey