0

I know that I can use WinDbg+PageHeap+ApplicationVerifier - Microsoft tools.

I read there are many tools available for C++ and wonder if there is something similar exists for C#?

net_prog
  • 9,921
  • 16
  • 55
  • 70

1 Answers1

3

These are the kind of tools you use to troubleshoot mis-behaving native code. Access violations, heap corruption, resource leaks, that sort of thing. That just doesn't happen in pure managed code by virtue of the concept of safe code and the garbage collector. If you have a dependency on native code in your managed project that misbehaves that way (Fatal Execution Engine Error for example) then you still use the same tools. Diagnosing it is never easy.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • 1
    Alone? No. Threading races don't cause heap corruption in .NET. – Hans Passant Sep 19 '11 at 15:40
  • [here](http://stackoverflow.com/questions/7574153/net-4-can-the-managed-code-alone-cause-a-heap-corruption) people say that the managed code can corrupt the heap. – net_prog Sep 27 '11 at 19:05
  • Yeah, sure, the Marshal class lets you break the rules. That's what it is for. If you haven't already scanned your code for Marshal, DllImport, unsafe and COM references then do make sure to ask help from a team member that knows the code base better. – Hans Passant Sep 27 '11 at 19:23