Browse Source

Workaround for exception during removing of breakpoint (can not reproduce though)

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@5290 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
David Srbecký 17 years ago
parent
commit
275ea5e6cd
  1. 17
      src/AddIns/Debugger/Debugger.Core/Breakpoint.cs

17
src/AddIns/Debugger/Debugger.Core/Breakpoint.cs

@ -7,6 +7,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.InteropServices;
using Debugger.Interop.CorDebug; using Debugger.Interop.CorDebug;
namespace Debugger namespace Debugger
@ -111,7 +113,20 @@ namespace Debugger
internal void Deactivate() internal void Deactivate()
{ {
foreach(ICorDebugFunctionBreakpoint corBreakpoint in corBreakpoints) { foreach(ICorDebugFunctionBreakpoint corBreakpoint in corBreakpoints) {
corBreakpoint.Activate(0); #if DEBUG
// Get repro
corBreakpoint.Activate(0);
#else
try {
corBreakpoint.Activate(0);
} catch(COMException e) {
// Sometimes happens, but we had not repro yet.
// 0x80131301: Process was terminated.
if ((uint)e.ErrorCode == 0x80131301)
continue;
throw;
}
#endif
} }
corBreakpoints.Clear(); corBreakpoints.Clear();
} }

Loading…
Cancel
Save