Got a strange problem here - some code in our application appears to be skipped when the profiler is attached. I am trying to get snapshots during a long calculation process. First I tried displaying message boxes, then I tried non blocking output coupled with Thread.Sleep. Then I found out about the API and tried to do a snapshot in code. In all cases, it appears that this line of code is simply not executed. Is there anything that the profiler could be doing to suppress this kind of thing? And that doesn't explain why the API didn't work (MemProfiler.IsProfiling returned true). I even went so far as to decompile the code - the instructions are definitely there.
Cheers in advance,
The profiler should not cause any code to be skipped. Are you sure that the correct assembly gets loaded? Have you tried to attach to the profiled process using Visual Studio 2005? In the debugger you will be able to see all loaded modules and make sure that the correct module has been loaded. You should also be able to put breakpoints and step in the code, which should give you some information about what's happening.
Note that the dispose tracker will replace Dispose methods and Finalizers, so you will have to disable the dispose tracker to be able to debug those methods.
SciTech Software AB
Users browsing this forum: No registered users and 14 guests