Is there a way to attach ANTS to a service, particularly one where the build is release instead of debug?
Ideally I’d like to be able to generate a dump then replay it later through the very pleasant ANTS UI. Can ANTS do this? If not are there tools that can?
If your service is .Net 4 then you can most certainly profile it by attaching to the process. You are also able to do this for a release build of the service. If needed, make sure to show the processes from all the users – then refresh the list to make sure you see your service in the list.
When attaching to a .Net4 process with the memory profiler you will need to disable concurrent Garbage collection, instructions on how to do this are here.
As long as you have disabled the concurrent collection, just attach to the .Net4 process for the service and interact with it as you need to, while taking snapshots of the memory when the application is in the desired state.
You are also able to automate the taking of snapshots from code in your application by using the API exposed by the Memory Profiler, this is explained here.