Program interaction with the Profiler.

Code profiling for .NET developers.

Moderators: AndrewH, melvyn.harbour, james.billings

Program interaction with the Profiler.

Postby fiddleus » Fri Jul 20, 2012 4:20 pm

My application crashes when launched with the profiler, so I need to connect after it's up and running. It's pretty easy for me to launch it, tweak any running parameters, click 'Go', then start the profiler. I also implemented an auto-shutdown feature so that when the real work was complete the profiler would not get 'junk input' afterwards.

Both of these situations are leading me to ask if there is any way to interact with the profiler from my application. Is there any way for my appto halt until the profiler connects, or to command the profiler to stop collection of data? The halt functionality wouldn't even be necessary -- in my case -- if there were just start/stop commands.

I'd also be interested in hearing any suggestions to more fluidly achieve what I'm attempting.

Thanks!
fiddleus
 
Posts: 1
Joined: Fri Jul 20, 2012 4:08 pm

Postby Chris.Allen » Mon Jul 23, 2012 1:13 pm

My application crashes when launched with the profiler, so I need to connect after it's up and running.


This sounds, very much, like you should try the "Attach to process" profiling mode. This fulfils the above requirement however, it *only* works for .Net 4 applications/websites and it does not work on Windows XP. Hopefully, its still an option for you.


Both of these situations are leading me to ask if there is any way to interact with the profiler from my application. Is there any way for my appto halt until the profiler connects, or to command the profiler to stop collection of data? The halt functionality wouldn't even be necessary -- in my case -- if there were just start/stop commands.

I'd also be interested in hearing any suggestions to more fluidly achieve what I'm attempting.


Try the above as I think it fits well. If not, I'll scratch my head and have another think (there's no interactive mode but maybe we can work something out. I guess any process can be paused...)
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to ANTS Performance Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests