Browse Source

handle the exception when starting ProcessMonitor(ManagementEventWatcher).

pull/15/head
Eusebiu Marcu 15 years ago
parent
commit
f008d1852e
  1. 15
      src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs

15
src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs

@ -157,11 +157,16 @@ namespace ICSharpCode.SharpDevelop.Services
if (index > -1){ if (index > -1){
Attach(processes[index]); Attach(processes[index]);
} else { } else {
this.monitor = new ProcessMonitor(processName); try {
this.monitor.ProcessCreated += delegate { this.monitor = new ProcessMonitor(processName);
WorkbenchSingleton.SafeThreadCall((Action)(() => OnProcessCreated(defaultAppProcess, options))); this.monitor.ProcessCreated += delegate {
}; WorkbenchSingleton.SafeThreadCall((Action)(() => OnProcessCreated(defaultAppProcess, options)));
this.monitor.Start(); };
this.monitor.Start();
}
catch (System.Exception ex) {
LoggingService.ErrorFormatted("Process Monitor exception: {0}", ex.Message);
}
} }
if (options.Data.WebServer == WebServer.IISExpress) { if (options.Data.WebServer == WebServer.IISExpress) {

Loading…
Cancel
Save