How to connect to a running application?

Questions about YourKit .NET Profiler
Post Reply
DJarrin
Posts: 15
Joined: Thu Mar 08, 2007 3:31 pm

How to connect to a running application?

Post by DJarrin »

How to connect to a running application?

I have my WinForms application running on my system. Then, in the YourKit Profiler startup page I select "Connect to locally running profiled application..." and I immediately get a dialog indicating that there are no applications running. What am I missing? I was expecting to see a list of processes running on my machine so I can select the one I want to connect to.

By the same to token, how do I connect to a remote application to profile? In the connection dialog I enter the host name but tells me that it cannot find any applications being profiled. Does is mean I need to run YourKit on the remote machine and then connect to that YourKit instance remotely?

I also would like to be able to connect to a Windows Service running on my machine so I can profile the service. Is it possible to do that? How would I attach to the running service?

Thank you for your assistance.

-David.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Have you started the applications with the profiler (either from within VS with help of "Profile", or from the profiler UI)?

The profiler cannot connect to a .net application running without profiler agent.
DJarrin
Posts: 15
Joined: Thu Mar 08, 2007 3:31 pm

Post by DJarrin »

No I have not, but tell me, how useful is it to be able to connect to an application that is already running within the profiler? I must be missing something because the idea is that I can attach to a process or application that is already running, like a windows service, to inspect how it is performing.

Be that as it may, how can start a Windows Service from YourKit?
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

I have my WinForms application running on my system. Then, in the YourKit Profiler startup page I select "Connect to locally running profiled application..." and I immediately get a dialog indicating that there are no applications running. What am I missing? I was expecting to see a list of processes running on my machine so I can select the one I want to connect to.
You absolutely properly understand the main idea, i.e. profiler shows the list of processes which support attaching. But attaching is only possible, if the .NET application was run with profiler agent. You can run any .NET application with profiler agent from "welcome screen", you can run IIS with profiler agent, but at this moment you cannot start Windows service with profiler agent. This is lacking feature and we are planning it for the next version.

Best regards,
Vladimir Kondratyev
obowyer
Posts: 2
Joined: Tue Mar 17, 2009 1:32 pm

Re: How to connect to a running application?

Post by obowyer »

Vladimir,

We have installed the shared license server (.NET) and I want to understand a few details so that I can help other developers in our organization using YourKit.

Steps for remote service profiling:
1) install and start YourKit client on the remote host to be profiled (this will consume 1 available license)
2) Start service on remote host
3) Install and start YourKit client on 2nd host (consumes 2nd license)
4) connect 2nd host to remote service and start profiling

Is this correct?

Thank you for your help.
Oscar Bowyer
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Re: How to connect to a running application?

Post by Vladimir Kondratyev »

Oscar, this is absolutely correct.
Post Reply