Ejemplo n.º 1
0
        public void AddBreakPoint(BreakPoint bp)
        {
            if (_editingBreakPoint != null)
            {
                // Copy state (number, condition, trip count etc...)
                bp.CopyState(_editingBreakPoint);

                // Replace it
                var index = _allBreakPoints.IndexOf(_editingBreakPoint);
                _allBreakPoints[index] = bp;

                PrepareBreakPoints();

                // Save
                OnSettingsChanged();
                WriteLine("Edited {0}", bp);
                return;
            }

            if (_allBreakPoints.Count > 0)
            {
                bp.Number = _allBreakPoints.Max(x => x.Number) + 1;
            }
            else
            {
                bp.Number = 1;
            }

            BreakPoints.Add(bp);

            PrepareBreakPoints();
            OnSettingsChanged();

            WriteLine("Added {0}", bp.ToString());
        }
Ejemplo n.º 2
0
 public void EnableBreakPoint(BreakPoint bp, bool enable)
 {
     bp.Enabled = enable;
     PrepareBreakPoints();
     OnSettingsChanged();
     WriteLine("{0} - {1}", enable ? "Enabled" : "Disabled", bp.ToString());
 }
Ejemplo n.º 3
0
 public void bp_reset(DebuggerCore debugger, BreakPoint bp = null)
 {
     if (bp != null)
     {
         bp.TripCount = 0;
         debugger.WriteLine(bp.ToString());
     }
     else
     {
         foreach (var x in debugger.BreakPoints)
         {
             x.TripCount = 0;
         }
         bp_list(debugger);
     }
 }
Ejemplo n.º 4
0
 public void SetBreakPointBreakCondition(BreakPoint bp, Expression condition)
 {
     bp.BreakConditionExpression = condition;
     OnSettingsChanged();
     WriteLine(bp.ToString());
 }