ide:debugger: completed gui part of breakpoint hit counter implementation. prevented...
authorRejean Loyer <rejean.loyer@gmail.com>
Tue, 6 Mar 2012 00:58:45 +0000 (19:58 -0500)
committerJerome St-Louis <jerome@ecere.com>
Tue, 6 Mar 2012 19:48:20 +0000 (14:48 -0500)
ide/src/debugger/Debugger.ec
ide/src/ide.ec
ide/src/panels/BreakpointsView.ec

index cdef67f..d997186 100644 (file)
@@ -2629,6 +2629,7 @@ class Debugger
                if(conditionMet && (bp.level == -1 || bp.level == frameCount))
                {
                   bp.hits++;
+                  ide.breakpointsView.UpdateBreakpoint(bp.row);
                   if(bp.hits > bp.ignore)
                   {
                      ignoreBreakpoints = false;
index 9d492f8..e7f034a 100644 (file)
@@ -1712,7 +1712,8 @@ class IDEWorkSpace : Window
             if(document.isDocument && fileName && !fstrcmp(fileName, filePath) && document.created)
             {
                document.visible = true;
-               document.Activate();
+               if(visible)
+                  document.Activate();
                return document;
             }
          }
index fe65d2e..c9964b0 100644 (file)
@@ -59,7 +59,7 @@ class BreakpointsView : Window
             {
                TrimLSpaces(string, string);
                TrimRSpaces(string, string);
-               //value = atoi(string);
+               value = atoi(string);
             }
             //str[0] = '\0';
             //sprintf(str, "%d", value);
@@ -108,6 +108,7 @@ class BreakpointsView : Window
    };
    
    DataField locationField { "char *", true, width = 180, header = $"Location" };
+   DataField hitsField { "int", false, width = 72, header = $"Hits" };
    DataField ignoreField { "char *", true, width = 72, header = $"Ignore Count" };
    DataField levelField { "char *", true, width = 50, header = $"Hit Level" };
    DataField conditionField { "char *", true, width = 130, header = $"Condition" };
@@ -115,6 +116,7 @@ class BreakpointsView : Window
    BreakpointsView()
    {
       listBox.AddField(locationField);
+      listBox.AddField(hitsField);
       listBox.AddField(ignoreField);
       listBox.AddField(levelField);
       listBox.AddField(conditionField);
@@ -224,6 +226,7 @@ class BreakpointsView : Window
             row.SetData(conditionField, bp.condition.expression);
          else
             row.SetData(conditionField, null);
+         row.SetData(hitsField, bp.hits);
       }
    }