Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
handle the exception when starting ProcessMonitor(ManagementEventWatc…
Browse files Browse the repository at this point in the history
…her).
  • Loading branch information
eusebiu committed Feb 3, 2011
1 parent 72660e1 commit f008d18
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs
Expand Up @@ -157,11 +157,16 @@ public void Start(ProcessStartInfo processStartInfo)
if (index > -1){
Attach(processes[index]);
} else {
this.monitor = new ProcessMonitor(processName);
this.monitor.ProcessCreated += delegate {
WorkbenchSingleton.SafeThreadCall((Action)(() => OnProcessCreated(defaultAppProcess, options)));
};
this.monitor.Start();
try {
this.monitor = new ProcessMonitor(processName);
this.monitor.ProcessCreated += delegate {
WorkbenchSingleton.SafeThreadCall((Action)(() => OnProcessCreated(defaultAppProcess, options)));
};
this.monitor.Start();
}
catch (System.Exception ex) {
LoggingService.ErrorFormatted("Process Monitor exception: {0}", ex.Message);
}
}

if (options.Data.WebServer == WebServer.IISExpress) {
Expand Down

0 comments on commit f008d18

Please sign in to comment.