public bool Equals(BreakpointLocation loc)
        {
            // If parameter is null, return false.
            if (Object.ReferenceEquals(loc, null))
            {
                return(false);
            }

            // Optimization for a common success case.
            if (Object.ReferenceEquals(this, loc))
            {
                return(true);
            }

            // If run-time types are not exactly the same, return false.
            if (this.GetType() != loc.GetType())
            {
                return(false);
            }

            // Return true if the fields match.
            // Note that the base class is not invoked because it is
            // System.Object, which defines Equals as reference equality.
            return((Target == loc.Target) && (Position == loc.Position));
        }
Beispiel #2
0
        public void OnTargetLeave(string name)
        {
            var loc = new BreakpointLocation(name, BreakpointPosition.End);

            if (breakpoints.Contains(loc))
            {
                ui.OnHitBreakpoint(loc);
            }
            ui.OnTargetLeave(name);
        }
Beispiel #3
0
        public void OnTargetEnter(string name)
        {
            ui.OnTargetEnter(name);
            var loc = new BreakpointLocation(name, BreakpointPosition.Start);

            if (breakpoints.Contains(loc))
            {
                ui.OnHitBreakpoint(loc);
            }
        }
Beispiel #4
0
        public void OnHitBreakpoint(BreakpointLocation loc)
        {
            Console.WriteLine("Hit breakpoint at {0} of target {1}", loc.GetPositionString(), loc.Target);
            var projectName = debugger.Analyzer.ProjectFileName();

            Console.Write("{0}> ", projectName);
            var key = Console.ReadKey();

            ClearLine();
            while (!ExecuteCommand(key))
            {
                Console.Write("{0}> ", projectName);
                key = Console.ReadKey();
                ClearLine();
            }
            Console.CursorLeft = 0;
        }