Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VS Automation DTE OnEnterBreakMode not triggered on Windows 2012

$
0
0

I'm writing a console application that uses C#, VS 2012 Automation (DTE) to open crash dump files, analyze them and output the call stack to a file.

The problem is that some crash dump files triggers the OnExceptionNotHandled event, and some don't (but they do trigger the OnEnterBreakMode. i need to handle both cases.

the application flow is:

  1. Create DTE instance
  2. Open a crash dump file
  3. Set up debugger events: OnExceptionNotHandled, OnEnterBreakMode
  4. Send the command "Debug with Mixed" (or as it called interop debug)
  5. A. if the crash dump triggers OnExceptionNotHandled event i set ExceptionAction to dbgExceptionAction.dbgExceptionActionBreak, and wait as the debugger is going to
    trigger OnEnterBreakMode (due to the ExceptionAction i just set).

    B. if the crash dump did not trigger the OnExceptionNotHandled event, it will trigger OnEnterBreakMode.

The problem is that this program flow works very well when tested on Windows 7. but when i deploy it on a VM machine running Windows 2012 the program has a problem, where for scenario A OnExceptionNotHandled is triggered, but OnEnterBreakMode will not trigger (this is not consistent, as sometimes it does). i do have a ManualResetEvent (with timeout) when i wait for these events, so usually my timeout pass and i need to "fail" this process. any subsequent calls to DTE fails with "SERVERCALL_RETRYLATER" (i have implement a MessageFilter). so i can't even stop debugger or close the IDE and need to kill devenv process, which is not nice.

a few notes:

  1. the program runs on the VM machine with windows 2012 under a scheduled task with admin privileges which runs a program that in turn runs my program which automate VS IDE. this task is also configured to run when no user is logged in.(i.e: Task -> Program A -> My Program -> DTE)
  2. I've tried to run the program manually (by not using the task) on the "failed" crash dumps and it worked well (but i am not sure if this is the case)
  3. I've made sure that every DTE object that i ref, such as dte, debugger, events, etc.. all are "saved" as data members in my class (i am not "chaining" anything).
  4. as far as i recall, the program also worked fine on 2012 machine on the "failed" crash dumps before i added the OnEnterBreakMode event (which is needed for scenario B).

Any Help would be very appreciated.


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>