Add vs autoattach to ue4 button

C#
  using EnvDTE;
  using EnvDTE80;
  using System;

public class C : VisualCommanderExt.ICommand
{
  public void Run(EnvDTE80.DTE2 DTE, Microsoft.VisualStudio.Shell.Package package)
  {
    foreach(Process2 proc in DTE.Debugger.LocalProcesses)
    {
      if(proc.Name.ToString().Contains("UE4Editor"))
      {
        proc.Attach2(""); //Can specify specific debug engine like "Native" "Managed"
        return;
      }
    }

    System.Windows.MessageBox.Show("UE4 instance was not found.");
  }
}
  • To add it to the toolbar:

GeneralDebugging_Addingbutton

GeneralDebugging_Addingbutton2