greenoldman
greenoldman

Reputation: 21062

Why is Memory Usage section disabled in performance profiler?

I would like to run Memory Usage session or Object Allocation (preferable both) but I have only available types CPU Usage and GPU Usage. VS does not show any hint while given section is disabled.

I tried out several other projects I wrote and one after another all have just those two sections.

I run 64-bit Windows 10.

Upvotes: 13

Views: 9781

Answers (4)

Roman M
Roman M

Reputation: 578

If .NET Object Allocation Tool option is disabled/not applicable when trying to start profiler for a Web project, ensure that Start Action is not set to "Don't open a page. Wait for a request from an external application".

This solution worked for me:

  1. Switch Project Properties -> Web -> Start Action to "Current Page"
  2. Save the project
  3. Close Diagnostic tools window and open a new one (ALT+F2)

The option .NET Object Allocation Tool should be moved from section "Not Applicable Tools" to "Available Tools"

enter image description here

enter image description here

Upvotes: 2

Ahmed Osama
Ahmed Osama

Reputation: 438

In may case, changing the Analysis Target to Startup Project instead of Running Process and Executable fixed the issue (Project targets .NET 4.8)

Upvotes: 1

Métoule
Métoule

Reputation: 14472

It's possible that the current tool selection prevents you from selecting what you want.

For example, here's what I see:

CPU usage and Database selected

I can't select the Memory Usage tool unless I deselect both the CPU Usage and Database tools:

Memory Usage selected

Upvotes: 19

Bachor
Bachor

Reputation: 878

In my case, Memory Usage was disabled because of project's framework version. It was set to 3.5. When I changed it to newest (on my computer 4.7.2), Memory Usage functionality starts working. After profiling, I will change framework version back to 3.5, due to our product compatibility.

Framework version settings is in: Project / Properties / Application / Target Framework

Upvotes: 3

Related Questions