Exemplo n.º 1
0
        private bool ShouldBreak(ServerProcess process, PlanNode node)
        {
            if (_disposed)
            {
                return(false);
            }

            if (process.ShouldBreak())
            {
                return(true);
            }

            if (_breakpoints.Count > 0)
            {
                DebugLocator currentLocation = process.ExecutingProgram.GetCurrentLocation();

                // Determine whether or not a breakpoint has been hit
                for (int index = 0; index < _breakpoints.Count; index++)
                {
                    Breakpoint breakpoint = _breakpoints[index];
                    if
                    (
                        (breakpoint.Locator == currentLocation.Locator) &&
                        (breakpoint.Line == currentLocation.Line) &&
                        ((breakpoint.LinePos == -1) || (breakpoint.LinePos == currentLocation.LinePos))
                    )
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }