/// <summary> /// Called when Visual Studio ends a debugging session. /// Shuts down the web server and debugger. /// </summary> /// <param name="reason">The parameter is not used.</param> private void DebuggerOnEnterDesignMode(dbgEventReason reason) { if (debugger_ != null) { debugger_.Dispose(); debugger_ = null; } if (webServer_ != null) { webServer_.Dispose(); webServer_ = null; } }
/// <summary> /// Called when Visual Studio starts a debugging session. /// Here we kick off the debugger and web server if appropriate. /// </summary> /// <param name="reason">Indicates how we are entering run mode (breakpoint or launch).</param> private void DebuggerOnEnterRunMode(dbgEventReason reason) { // If we are starting debugging (not re-entering from a breakpoint) // then load project settings and start the debugger-helper. if (reason == dbgEventReason.dbgEventReasonLaunchProgram) { PropertyManager properties = new PropertyManager(); properties.SetTargetToActive(dte_); if (properties.PlatformType == PropertyManager.ProjectPlatformType.NaCl) { debugger_ = new PluginDebuggerGDB(dte_, properties); webServer_ = new WebServer(webServerOutputPane_, properties); } else if (properties.PlatformType == PropertyManager.ProjectPlatformType.Pepper) { debugger_ = new PluginDebuggerVS(dte_, properties); webServer_ = new WebServer(webServerOutputPane_, properties); } } }