2010-03-09 3 views
2

때때로 SharpDevelop에서 중단 점 수단에 어떤 올리브 총알과 올리브 적색에서 색의 변화 디버깅을 시작 :내가 중단 점을 설정할 때

yellow bullet

을 전혀 멈추지 않습니다 디버깅을 발생하면 - 중단 점입니다 무시.

왜 이런 일이 일어나고 앞으로 어떻게 피할 수 있는지 알고 싶습니다.

편집 :

중단 점은 코드의 주석 라인에 설정되어있는 경우에만 발생하지 않습니다

:

not commented olive bullet

답변

3

오픈 소스입니다.

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"입니다 : 그것을 다운로드하고 관련 코드를 찾는 것은 나에게 약 5 분이 걸렸다. isHealthy이 false 인 이유를 알고 싶으면 소스를 사용하십시오. 빨리 찾을 수있는 몇 가지 이유가 있습니다. 소스 파일이 변경되었거나 모듈이로드되지 않았습니다. 더있을 수 있습니다.

1

브레이크 포인트가 설정되어있는 경우 귀하의 라인이 주석.

+0

예, 댓글을 달았지만 그 경우는 생각하지 않습니다. 빠른 테스트를 만들었고 주석 처리 된 코드 줄이 잘 작동하는 것 같습니다. -> http://imgur.com/ssV1W.png – Marek

2

"릴리스"로 프로그램을 컴파일하는 경우 발생합니다.