Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Occasionally when investigating SQL Server issues I find it useful to be able to attach the Visual Studio debugger to it and try and figure out what it is doing by looking at the call stack (the public symbols are available and often it is possible to infer useful information from the method names).

A great example of the type of internals information that can be inferred is in this blog post which inspired my attempts.

This can be quite a time consuming and tedious process however. Generally I run the code of interest in a loop attach the debugger then continually break and continue until I hit a call stack that looks interesting to the matter under investigation. I can then step through the code and look at the method names being called. This takes ages however.

Is there any way of automating this so I can simply log all the methods called for a short period then review the log file afterwards?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The profiler in higher versions of Visual Studio can be used to do this.

Example Output

Screenshot

(And the answer here shows why this is useful)

share|improve this answer

if i am not mistaken your probably looking for procmon. you can get it from microsoft website http://technet.microsoft.com/en-us/sysinternals/bb896645

share|improve this answer
    
I'm familiar with procmon. That traces file access, registry access etc. I am trying to trace the path of execution. –  Martin Smith Apr 29 '12 at 17:38
    
How about Process Explorer, much more powerful...technet.microsoft.com/en-us/sysinternals/bb896653 –  Moab Apr 30 '12 at 0:10
    
@Moab - AFAIK Process Explorer can load the public symbols from the MS symbol server and show the current call stack but has no capabilities to log calls over time? –  Martin Smith Apr 30 '12 at 6:31
    
@MartinSmith not sure, I am not an expert in using that software unfortunately. –  Moab Apr 30 '12 at 13:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.