Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting correct call stacks in VS Concurrency profiler

I'm using the VS Concurrency profiler to profile a WPF application, but I can't get symbols for NGen'ned images like PresentationCore et al, so my call stacks all look like:

Is there a way to make VS do the right thing here? Edit: I have correctly configured my symbol paths, that's not the issue.

like image 615
Ana Betts Avatar asked Jan 24 '12 19:01

Ana Betts


1 Answers

Figured this one out - if you follow the steps here, it works out pretty well. Here's the short version:

  1. Start an elevated CMD prompt
  2. set COMPLUS_ZapDisable=1
  3. "%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\ide\devenv.exe"
  4. Go into your csproj settings, Debug Tab, and Disable the VS Hosting Process
  5. Kick off the profiler - your app will be a fair bit slower because you're not using the NGen DLLs but it'll still be proportionally accurate in the profile result.
like image 124
Ana Betts Avatar answered Oct 13 '22 02:10

Ana Betts