Questions to Breakpoints

SyntaxEditor for WPF Forum

Posted 8 years ago by Frank Link - CEO, FLK Consulting UG
Version: 16.1.0631
Avatar

Hi,

I have several questions to Breakpoints.

  1. How can I check if a line has a Breakpoint by a given Linenumber
  2. How can I check if a document has Breakpoints
  3. How can I get a list of Breakpoints with Linenumber, State and Text in Line

Can you help me with examples?

regards

Frank

Comments (2)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Frank,

Have you looked at our "Indicators - Debugging" QuickStart? That shows many concepts related to breakpoints. The "Indicators" topic in the documentation is also essential reading.

1) The document.IndicatorManager.Breakpoints.GetInstances() method will give you access to the breakpoint tag ranges. There is an overload where you pass it a snapshot range and it returns the intersecting breakpoint tag ranges. You'd pass in the line's snapshot range.

2) At the moment, you'd have to do document.IndicatorManager.Breakpoints.GetInstances().Any() to check. We will add a Count property for the next build.

3) You can get the list of that info like this:

foreach (var bpTagRange in document.IndicatorManager.Breakpoints.GetInstances()) {
  var bpRange = bpTagRange.VersionRange.Translate(document.CurrentSnapshot);
  var lineNum = bpRange.StartLine;
  var isEnabled = bpTagRange.Tag.IsEnabled;
  var text = document.CurrentSnapshot.GetSubstring(bpRange);
}


Actipro Software Support

Posted 8 years ago by Frank Link - CEO, FLK Consulting UG
Avatar

Hi,

thanks for the answer. I have found it in your examples.

regard

Frank

The latest build of this product (v24.1.3) was released 26 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.