SharpDevelopの中にブレークポイント手段にどのようなオリーブの弾丸

StackOverflow https://stackoverflow.com/questions/2409388

  •  18-09-2019
  •  | 
  •  

質問

時々私はブレークポイントを設定し、オリーブに赤からその色の変化のデバッグを開始するときます:

黄色い弾丸

すべて停止しないデバッグが起こる - 。ブレークポイントは無視されます。

私はこの問題が発生し、将来的には、それを回避する方法理由を知りたい。

編集ます:

ブレークポイントがコードのコメント行を上に設定されている場合にのみ起こるしません

コメントしていないオリーブの弾丸

役に立ちましたか?

解決

これはオープンソースです。それをダウンロードし、関連するコードを見つけることが私には約5分かかりました。

   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));
                    }
                }
            }
        }
    }

その円の色は "Color.Olive" です。 isHealthyがfalseである理由を知りたい場合は、ソースを使用。私はすぐに見つけることができる理由のカップルがあります:ソースファイルが変更されたか、モジュールがロードされていない、もっとあるかもしれません。

他のヒント

あなたは、「リリース」としてプログラムをコンパイルする場合は、

これが発生します。

ブレークポイントが設定されている。ここで、

あなたの行がコメント化されています。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top