Visual studio 2015 profiler not showing anything from my code

17,905

Solution 1

Try this: Debug -> Start Diagnostic Tools Without Debugger and from there select Performance Wizard rather than CPU Usage, and only from there select CPU or other option you need, this solved the problem in my case.

Solution 2

The accepted answer didn't work for me - in my case the problem seems to be that I didn't have Debug Info generated in my Program Database File.

The fix I needed was to change Configuration Properties → Linker → Debugging → Generate Debug Info to Yes for my Release configuration, and then recompile all.

Solution 3

In my case the problem was resolved by checking "Enable .net Framework source stepping" option in Tools > Options > Debugging > General. This would also disable "Enable Just My Code".

On a side note, it appears that VS2015 profiler is not particularly effective in finding out finalizer issues if you have lot of disposible objects that you never explicitly dispose (causing finalizer thread to over work). I used JetBrain dotTrace which did pointed out this issue.

Solution 4

I found this thread, and then found a solution... At least in the VS2015 Update 3, the Diagnostic Tools -> CPU Usage -> Filter drop-down has a "Show External Code" checkbox, which when checked expands all [External Code] placeholders.

Share:
17,905

Related videos on Youtube

Silencer
Author by

Silencer

Updated on June 04, 2022

Comments

  • Silencer
    Silencer almost 2 years

    I'm trying to use profiler from Visual Studio 2015 Community for CPU usage, and all I get is just my exe and [External code], nothing else:profiler result

    There is a generated pdb file, and I tried to clean and rebuild my project, disabled just my code; could someone help me ? Thanks.

    • Alex
      Alex over 8 years
      Have you solved this issue somehow? I have the same problem..
    • Alex
      Alex over 8 years
      Actually, changing the target to Application (exe) rather than Starting Project seems to work.
    • vm2mv
      vm2mv over 8 years
      The problem is fixed in Update 1 CTP.
  • Adi Shavit
    Adi Shavit over 8 years
    "CPU Usage" must be un-checked otherwise the "Performace Wizard" check-box is disabled.
  • meJustAndrew
    meJustAndrew almost 7 years
    I don't have the option Start Diagnostic Tools Without Debugger under the Debug menu in VS2015. How can I find it?
  • Owl
    Owl over 6 years
    That shows external code time, but no information on how long your code took to run.
  • Owl
    Owl over 6 years
    Unfortunately there seems to be no way to attach to a running process using it. So if you have a service which VS cannot start up, this tool is hopeless.
  • dashesy
    dashesy almost 5 years
    "CPU Usage" is confusing, and is useless. "CPU sampling" is what most people are interested in, which is inside "Performance Wizard"