views:

83

answers:

2

Sometimes when I set a breakpoint and start debugging its color changes from red to olive:

yellow bullet

When it happens debugging doesn't stop at all - breakpoint is ignored.

I want to know why this happens and how to avoid it in the future.

Edit:

It does not happens only when breakpoint is set on commented line of code:

not commented olive bullet

+1  A: 

Your line is commented where the breakpoint is set.

thelost
Yes, it is commented but I don't think its the case. I've made quick test and breakpointing commented line of code seems to work fine -> http://imgur.com/ssV1W.png
Cornelius
+2  A: 

It's open source. Downloading it and finding the relevant code took me about 5 minutes:

   public void DrawBreakpoint(Graphics g, int y, bool isEnabled, bool isHealthy)
    {
        int diameter = Math.Min(iconBarWidth - 2, textArea.TextView.FontHeight);
        Rectangle rect = new Rectangle(1,
                                       y + (textArea.TextView.FontHeight -
                                                           diameter) / 2,
                                       diameter,
                                       diameter);


        using (GraphicsPath path = new GraphicsPath()) {
            path.AddEllipse(rect);
            using (PathGradientBrush pthGrBrush = new PathGradientBrush(path)) {
                pthGrBrush.CenterPoint = new PointF(rect.Left + rect.Width / 3 , 
                                            rect.Top + rect.Height / 3);
                pthGrBrush.CenterColor = Color.MistyRose;
                Color[] colors = {isHealthy ? Color.Firebrick : Color.Olive};
                pthGrBrush.SurroundColors = colors;

                if (isEnabled) {
                    g.FillEllipse(pthGrBrush, rect);
                } else {
                    g.FillEllipse(SystemBrushes.Control, rect);
                    using (Pen pen = new Pen(pthGrBrush)) {
                        g.DrawEllipse(pen, new Rectangle(rect.X + 1, rect.Y + 1, 
                                                         rect.Width - 2, 
                                                         rect.Height - 2));
                    }
                }
            }
        }
    }

That circle color is "Color.Olive". If you want to know why isHealthy is false, use the source. There's a couple of reasons I could find quickly: the source file has changed or the module isn't loaded, There may be more.

clintp