6
votes

Is there a tool for attaching to a running process which is in .NET 3.5 and take a snapshot?

I have looked at .NET Memory profiler, dotTrace memory and RedGate ANTS profiler and none of them seems to be able to do it.

.NET Memory profiler and ANTS can attach to only to .NET 4.0 processes and dotTrace memory does not seem to be able to attach to running processes.


UPDATE

OS is Windows Server 2003 (R2).

2
If you are running in Windows Vista or higher you can use Task Manager to take a dump of the process. then you can load this dump file into .NET Memory Profiler (I do it all the time....) - Asher
@Asher does it work with .NET 3.5?? If so add the answer please. Operating system is Windows server 2003. - Aliostad
Yes it will. In Windows Server 2003 the built in Windows Task Manager doesn't have the option to create a dump for a process but you can use Process Explorer to do that: technet.microsoft.com/en-us/sysinternals/bb896653.aspx - Asher

2 Answers

1
votes

As you mentioned in your question, ANTS can use with .NET 4.0 or higher. What you have to do is forcing your application to use .NET 4, this does not required you to recompile the code. It just forced the application to use .NET 4 runtime.

0
votes

The memory profiler in Telerik JustTrace will take snapshots of 2.0/3.5 applications. You may receive a warning that it won't attach the profiler, but if you do it anyway JustTrace will attach a debugger to get the same info. Note: this only works for the memory profiler, not the performance profiler.