Ask a questionAsk a question
 

AnswerHow about in-process debugging?

  • Friday, October 30, 2009 2:17 AMlpszDan Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I remember there was an in-process debugging api.
    So what are the limitations of in-process debugging and can it even be done?
    Thanks
    Dan

Answers

  • Friday, October 30, 2009 3:57 PMKarel ZikmundMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    No, AFAIK .NET process cannot debug itself (i.e. in-process).

    -Karel
  • Monday, November 02, 2009 5:41 PMRick ByersMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Karel is right.  The CLR did support some limited in-process debugging (shared with profiling) back in 1.x, but it was brittle and hard to use reliably, and so in 2.0 we pulled it - moving to a strictly out-of-process debugging API model.  There are still some in-process diagnostics you can do though, eg. using ICorProfile and System.Diagnostics.StackTrace.

    Rick

All Replies

  • Friday, October 30, 2009 3:57 PMKarel ZikmundMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    No, AFAIK .NET process cannot debug itself (i.e. in-process).

    -Karel
  • Monday, November 02, 2009 5:41 PMRick ByersMSFT, OwnerUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Karel is right.  The CLR did support some limited in-process debugging (shared with profiling) back in 1.x, but it was brittle and hard to use reliably, and so in 2.0 we pulled it - moving to a strictly out-of-process debugging API model.  There are still some in-process diagnostics you can do though, eg. using ICorProfile and System.Diagnostics.StackTrace.

    Rick