locked
Debugger does not show "step into, step over, etc" after calling Attach2(engines.) RRS feed

  • Question

  • Hi there,

    I am having a few issues with regard to the debugger and the IDE after calling Process.Attach2(engines). I am using VS2012 Premium or VS2013 Premium.  The following is the code:

    public void AttachToProgram(EnvDTE80.DTE2 DTE)
       {
          try
          {
             Debugger2 ideDebugger = (Debugger2)DTE.Debugger;
             Transport trans = ideDebugger.Transports.Item("Default");
             EnvDTE80.Engine[] dbgeng = new EnvDTE80.Engine[2];
    
             dbgeng[0] = trans.Engines.Item("Managed (v3.5, v3.0, v2.0)");
             dbgeng[1] = trans.Engines.Item("Native");
    
             EnvDTE80.Process2 proc2 = (Process2)ideDebugger.GetProcesses(trans, Environment.MachineName).Item("programName.exe");
    
             proc2.Attach2(dbgeng);
          }
          catch (System.Exception ex)
          {
             MessageBox.Show(ex.Message);
          }
       }

    This used to work in VS2012 Premium up until I installed VS2013 about 2 months back. The symptoms:

    -Does it attach to the process? = YES

    -Does it break at break points? = YES

    -Can you step in debugger? = Sort of - the tool bar that appears at the top does NOT give the option for continue, step over, step into, etc. However, if I go into the Debug drop down the options are available, and work.

    -The IDE text editor no longer responds to the arrow keys. Normal typing is available but no backspace or delete. Stopping the debugger has no effect. The IDE will no longer respond correctly, IDE reboot is required to bring it back to normal.

    OS - Windows 7 Enterprise 64bit - SP1

    IDE - 

    Microsoft Visual Studio Premium 2013
    Version 12.0.30110.00 Update 1
    Microsoft .NET Framework
    Version 4.5.50938

    Thoughts? Suggestions? Ideas?

    -Greg

    PS. Original post and feed back can be located here: http://social.msdn.microsoft.com/Forums/vstudio/en-US/414f77ee-87bb-4db4-9033-edd197ea1a1f/debugger-does-not-show-step-into-step-over-etc-after-calling-attach2engines?forum=vsdebug

    Thursday, February 20, 2014 12:17 PM

All replies

  • Hi,

    I have checked the link you provide us. Could you please tell us tha what extension you want to realize?

    Could you please tell us what project you create? What function of your project?

    >>Debugger does not show "step into, step over, etc" after calling Attach2(engines.)                                 

    Do you mean those tabs ("step into, step over, etc") disappear or be gray?   

    Best regards,

    Sunny                            

    Friday, February 21, 2014 9:17 AM
  • Hi Sunny,

    All I am legally allowed to tell you is that it is an in-house extension for VS that will provide commands specific to our work flow. It is meant to speed up development and testing, while following standards laid out by the company. One such example is attaching to our program/application/software for debugging. 

    The project is a 2013 Visual Studio Package. Under "Other Project, Extensibility, VS Package" language is C#. Target framework is .NET 4.5

    The debugger toolbar buttons are greyed out. The shortcut keys are non responsive. The debugger drop down menu DOES allows for stopping, continue, step over, step into, etc. 

    The IDE text editor no longer responds to arrow keys, delete, backspace, key bindings. But will respond to regular text input (ie. qwerty). Stopping the debugger does not return the IDE text editor to its prior state. VS must be restarted for it to respond correctly.

    -Greg

    Friday, February 21, 2014 1:21 PM