Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy-to-use performance and memory .NET profiler for Windows, Linux and macOS.
Secure and easy profiling in cloud, containers and clustered environments.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

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.

System requirements

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 COR_PROFILER 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.

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.