Reputation: 593
I'm trying to use visual studio performance profiler for the first time and I'm interested in a specific function of mine which is successfully detected by the profiler. However, when I click on it I get "Source information is not available" .
How do I fix this?
All external functions from libraries are visible. Any function that is in "lab.cpp" won't show. I mean, not even "main" is available. This is the only file I edit, I write all my code in there:
Upvotes: 1
Views: 4577
Reputation: 808
My issue is for C# using the CPU usage within the Performance Profiler.
On the solution, right click on the Solution. On the context menu select Properties. The Solution Property modal should appear. Within Common Properties > Debug Source Files add any local Debug folders.
Run the Performance Profiler. On CPU Usage overview with Current View: Functions, right click desired module to bring up the context menu. "Load All Symbols". This brought up the code and percentages as expected.
Upvotes: 3
Reputation: 9555
The accepted answer for this question says that you just need to add a Debug Information Format in Release, for me doing this was not enough. I needed to add a Debug Information Format and turn on "Generate Debug Info" in Release.
I recommend creating a new configuration called "Release with Debug Info" using the Configuration Manager (which you can get to from the Configuration combobox/dropdown), copying the settings from "Release" into "Release with Debug Info" and then making the two changes documented in this answer in the new configuration.
Upvotes: 0
Reputation: 593
In case someone else has the same problem, I solved it by setting the "Debug Information Format" which was previously empty in my cpp file's(the file containing the functions) General Properties:
Upvotes: 6