public void DeleteTemporaryBreakPonts() { if (Platform == null) { return; } if (BreakPoints.Count == 0) { return; } var temps = new List <BreakPoint>(); foreach (var breakpoint in BreakPoints) { if (breakpoint.Temporary && breakpoint.Address == InstructionPointer) { temps.Add(breakpoint); } } foreach (var breakpoint in temps) { BreakPoints.Remove(breakpoint); GDBConnector.ClearBreakPoint(breakpoint.Address); } if (temps.Count != 0) { NotifyBreakPointChange(); } }
// Method to handle the Debugger BreakpointUpdated event. // This method will display the current breakpoint change and maintain a // collection of all current breakpoints. private void HandlerBreakpointUpdatedEvent(object sender, BreakpointUpdatedEventArgs args) { switch (args.UpdateType) { case BreakpointUpdateType.Set: if (!BreakPoints.ContainsKey(args.Breakpoint.Id)) { BreakPoints.Add(args.Breakpoint.Id, args.Breakpoint); } UserIOImpl.PrintMessage("HandlerBreakpointUpdatedEvent> breakpoint created"); break; case BreakpointUpdateType.Removed: BreakPoints.Remove(args.Breakpoint.Id); UserIOImpl.PrintMessage("HandlerBreakpointUpdatedEvent> breakpoint removed"); break; case BreakpointUpdateType.Enabled: UserIOImpl.PrintMessage("HandlerBreakpointUpdatedEvent> breakpoint enabled"); break; case BreakpointUpdateType.Disabled: UserIOImpl.PrintMessage("HandlerBreakpointUpdatedEvent> breakpoint disabled"); break; } UserIOImpl.PrintMessage(args.Breakpoint.ToString()); }
public void RemoveBreakPoint(BreakPoint breakpoint) { BreakPoints.Remove(breakpoint); GDBConnector.ClearBreakPoint(breakpoint.Address); NotifyBreakPointChange(); }
//_____________________________________________________________________________________________________________________________________________________________ public void Remove() { DeleteIfExists(fullProjectFileName); BreakPoints.Remove(); Functions.Remove(); }
void IconBarMargin_MouseDown(AbstractMargin sender, Point mousepos, MouseButtons mouseButtons) { if (mouseButtons != MouseButtons.Left) { return; } var textArea = _textEditor.ActiveTextAreaControl.TextArea; int yPos = mousepos.Y; int lineHeight = textArea.TextView.FontHeight; int lineNumber = (yPos + textArea.VirtualTop.Y) / lineHeight; if (BreakPoints.Any(p => p.Line == lineNumber + 1) || lineNumber >= textArea.Document.TotalNumberOfLines) { return; } string text = textArea.Document.GetText(textArea.Document.GetLineSegment(lineNumber)); int offset = -1; for (int i = 0; i < text.Length; i++) { if ( !Char.IsWhiteSpace(text[i]) && text[i] != '/' ) { offset = i; break; } } if (offset == -1) { return; } var breakPoint = new EditorBreakPoint(lineNumber + 1, offset); BreakPoints.Add(breakPoint); if (_script != null) { breakPoint.BreakPoint = new BreakPoint(Script.Script, lineNumber + 1, offset); _script.Engine.BreakPoints.Add(breakPoint.BreakPoint); } var document = _textEditor.Document; var mark = new BreakPointMark( document, new TextLocation( offset, lineNumber ) ); mark.Removed += (s, e) => { BreakPoints.Remove(breakPoint); _script?.Engine.BreakPoints.Remove(breakPoint.BreakPoint); }; document.BookmarkManager.AddMark(mark); _textEditor.Refresh(); }
private void RemoveBreakPoint(JToken bp) => BreakPoints.Remove(BreakPoints.Find(bp.ToObject <string>()));