Taking snapshots while breakpointing C# application

Memory profiling for .NET developers

Moderators: Luke Jefferson, StephenC, AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Taking snapshots while breakpointing C# application

Postby SCPP » Mon Jan 30, 2012 4:33 am

Hi,

Just wondering if it is possible to take snapshots while the program has hit a breakpoint. Basically what I have done is started memory profiling then attached my debugger and set some breakpoints.

I want to work out which calls in a particular large method are allocating varying amounts of memory from one version of our application to a newer version.

Currently the "Taking snapshot" is frozen so I'm guessing that Memory Profiler requires the app to not have threads paused. Is there a recommended way to test this scenario?

Thanks in advance!
SC
SCPP
 
Posts: 7
Joined: Tue Aug 23, 2011 4:35 am

Postby jrg » Mon Jan 30, 2012 11:42 am

You could use the snapshot API to take a snapshot at a particular point in your code, in place of using breakpoints.

http://www.red-gate.com/supportcenter/c ... apshot_api

(You're correct that snapshots can't be taken when all the threads are paused in a debugger)
Test Engineer, .NET Division
Red Gate Software
jrg
 
Posts: 13
Joined: Fri Jul 02, 2010 3:13 pm

Re:

Postby SCPP » Tue Jan 31, 2012 2:31 am

jrg wrote:You could use the snapshot API to take a snapshot at a particular point in your code, in place of using breakpoints.

http://www.red-gate.com/supportcenter/c ... apshot_api

(You're correct that snapshots can't be taken when all the threads are paused in a debugger)

Thanks
SCPP
 
Posts: 7
Joined: Tue Aug 23, 2011 4:35 am


Return to ANTS Memory Profiler 7

Who is online

Users browsing this forum: No registered users and 1 guest