- System requirements
- Profiler architecture
- Running the profiler
- Profiler activation
- Start profiling
- IDE integration
- Profile .NET executable
- Profile ASP.NET application IIS
- Profile all .NET processes that will start
- Attach profiler to a running application
- Profile remote applications
- Profiling in Docker container
- Manually enable profiling of local applications
- Startup options
- Profiling overhead: how to reduce or avoid
- Profiling troubleshooting
- Connect to profiled application
- Capturing snapshots
- Solving performance problems
- CPU profiling
- Memory profiling
- Garbage collection
- Exception profiling
- Probes: monitor higher level events
- Performance Charts
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Summary, snapshot annotation, automatic deobfuscation
- Time measurement (CPU time, wall time)
- Snapshot directory customization
- Export of profiling results to HTML, CSV, XML, plain text
- Profiler API
- Profiler HTTP API
- Command line tool to control profiling
Attach profiler to a running application
Attach technique allows to load the profiler agent into running .NET runtime. In spite of its simplicity and convenience, attaching has several limitations in functionality, what is why it is preferred when profiler agent is loaded into .NET runtime on application startup.
1. Attach works in .NET Framework 4 and renew, and in .NET Core 3 and newer. Attach will not work in .NET Framework 3.x or in .NET Core 2.x.
2. .NET runtime has a limitation, that only one profiler agent can be loaded at a time.
It means that attach will fail, if another profiler agent is
already loaded. To avoid a profiler conflict, please
make sure, that the environment variable
is not set.
Attach from Welcome screen
All detected locally running .NET applications are shown in the "Monitor Applications" list on Welcome screen. The colored circle indicates the profiler agent status. When agent is already loaded the circle is green. Orange circle shows that agent is not yet loaded but can be attached.
Attach from command line
Run the command line tool to attach profiler agent and then connect from Welcome screen.
Attach mode limitations
Not all profiling capabilities are available in the attach mode due to .NET runtime limitations listed below. To get all capabilities, application should be started with the profiler.
- Memory profiling is disabled for applications running in concurrent GC mode. Read this MSDN article to learn how to avoid using concurrent GC mode.
- CPU tracing is not available. Use sampling instead.
- Some threads started before attach will not be shown. In particular, they will not be seen in the Threads view and in CPU sampling results. To make some of the threads appear, you may try to explicitly force garbage collection via corresponding toolbar button.
- Object allocation recording is disabled.
- Exception profiling is disabled.
- Event recording with Probes is not available.