From 7d76c1cb1b95a2d6b732a6efed10052d75a2da32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Fri, 28 Apr 2006 19:32:31 +0000 Subject: [PATCH] Breakpoint must be set within method body. (Forum-7107) git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1365 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../Project/Src/Threads/SourcecodeSegment.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/SourcecodeSegment.cs b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/SourcecodeSegment.cs index 1d6aaf26cc..b27dc2ca2c 100644 --- a/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/SourcecodeSegment.cs +++ b/src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Threads/SourcecodeSegment.cs @@ -158,7 +158,7 @@ namespace Debugger function = null; ilOffset = 0; - Module module = null; + Module module = null; ISymUnmanagedReader symReader = null; ISymUnmanagedDocument symDoc = null; @@ -206,7 +206,11 @@ namespace Debugger } ISymUnmanagedMethod symMethod; - symMethod = symReader.GetMethodFromDocumentPosition(symDoc, validLine, (uint)StartColumn); + try { + symMethod = symReader.GetMethodFromDocumentPosition(symDoc, (uint)StartLine, (uint)StartColumn); + } catch { + return false; //Not found + } function = module.CorModule.GetFunctionFromToken(symMethod.Token);