Can I hook into the debug button in visual studio to add custom build functionality?
<p>I started learning Electron today and I want to be able to run my project out of Visual Studio. I have gotten to the point where I want to be able to click debug and have Visual Studio launch the application. I used a msbuild task to run the electron.exe on the app directory of the project but this happens when I build. I would really want to be able to be able to click the debug button to launch the application. Does anyone know how I can change the behaviour of the debug button in Visual Studio 2015? I would like the debug button to call electron.exe with my app directory as its input so exactly what my custom task for msbuild is doing.</p>

<p>Here is the code for my msbuild task.</p>

<pre class="lang-csharp prettyprint-override"><code>using System.Diagnostics;
using System.IO;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;

namespace Electron.Tasks
{
    public class ElectronBuild : Task
    {
        [Required]
        public string ElectronPath { get; set; }

        [Required]
        public string AppPath { get; set; }

        public override bool Execute()
        {
            var processStartInfo = new ProcessStartInfo(Path.Combine(ElectronPath, "Electron.exe"))
            {
                Arguments = AppPath,
                RedirectStandardOutput = true,
                RedirectStandardError = true,
                UseShellExecute = false
            };

            var process = Process.Start(processStartInfo);

            var output = process.StandardOutput.ReadToEnd();
            output = process.StandardError.ReadToEnd();

            Log.LogMessage(output);

            return true;
        }
    }
}
</code></pre>