diff --git a/VisualPascalABCNETLinux/IB/Debugger/Debugger.cs b/VisualPascalABCNETLinux/IB/Debugger/Debugger.cs index bff55cff4..3c3d88221 100644 --- a/VisualPascalABCNETLinux/IB/Debugger/Debugger.cs +++ b/VisualPascalABCNETLinux/IB/Debugger/Debugger.cs @@ -978,13 +978,32 @@ namespace VisualPascalABC private Mono.Debugging.Client.SourceLocation stepin_stmt = null; private bool tab_changed=false; + private delegate void JumpToLineDelegate(int line); + private delegate void JumpToLinePreActionsDelegate(); + private delegate void SetCurrentLineBookmarkDelegate(string fileName, IDocument document, int makerStartLine, int makerStartColumn, int makerEndLine, int makerEndColumn); + + void JumpToLineInvoke(int line) + { + curPage.TextEditor.ActiveTextAreaControl.JumpTo(line, 0); + } + + void JumpToLinePreActionsInvoke() + { + workbench.MainForm.Activate(); + CurrentLineBookmark.Remove();//udalajem zheltyj kursor otladki + } + + void SetCurrentLineBookmarkInvoke(string fileName, IDocument document, int makerStartLine, int makerStartColumn, int makerEndLine, int makerEndColumn) + { + CurrentLineBookmark.SetPosition(fileName, document, makerStartLine, makerStartColumn, makerEndLine, makerEndColumn); + } + /// /// Перейти к следующей строке при отладке /// private void JumpToCurrentLine(bool fromBreakpoint = false) { - workbench.MainForm.Activate(); - CurrentLineBookmark.Remove();//udalajem zheltyj kursor otladki + workbench.MainForm.Invoke(new JumpToLinePreActionsDelegate(JumpToLinePreActionsInvoke)); //System.Threading.Thread.Sleep(70); if (stackFrame != null) { @@ -1030,6 +1049,7 @@ namespace VisualPascalABC { tab_changed = true; curPage = WorkbenchServiceFactory.FileService.OpenFileForDebug(stackFrame.SourceLocation.FileName); + if (curPage == null) { MustDebug = true; @@ -1112,10 +1132,12 @@ namespace VisualPascalABC } } } - //for (int i=0; i