Displaying Saved Breakpoints

Hi -
I am using the DebugEditControl and I'm saving the breakpoints when my application closes and re-setting them the next time it runs using:
Editor.Debugger.Breakpoints.AddBreakpoint(file, line)
I can see that the breakpoint exists in the collection after adding it, but it is not displayed on the screen. Is there a UI refresh method I should be calling after setting the breakpoints manually? I have tried using BeginUpdate and EndUpdate but it is still not working.
Thanks!
Hi,
you can use code like this:
private void ReloadBreakpointsFromDebugger(DebugCodeEdit edit)
{
foreach (Breakpoint bp in Debugger.Breakpoints.Breakpoints)
{
if (string.Compare(bp.FilePath, edit.FileName) == 0)
{
var parser = edit.Lexer as Alternet.Syntax.ISyntaxParser;

var range = parser?.GetActiveStatementAt(new Point(0, bp.LineNumber));

if ((range != null) && !range.IsEmpty)
edit.Source.LineStyles.SetLineStyle(range, -1, 1);
else
edit.Source.LineStyles.SetLineStyle(bp.LineNumber - 1, 1);
}
}
}
Regards,
Andrew