get code covered between 2 breakpoints

Hello all,

I have a surprisingly tough debugging challenge. I have 2 breakpoints set. Between those 2 breakpoints unknown code is run that alters a global variable. I just can't find that unknown code. Stepping using F11 starting at breakpoint#1 does not reach the unknown code. Sadly in C# data breakpoint are not supported:(

I hoped to solve my issue making 2 dotCover snapshots and comparing them, but can't seem to restrict these snapshot to between these 2 breakpoints. The snapshot simple grow too large to investigate properly. Can anyone help me out?

Regards, Jan.

1 comment
Comment actions Permalink

Hi Jan,
This scenario is currently not supported directly, however you can achieve the result using internal features.

The steps are the following:
- reference JetBrains.Profiler.Core.Api.dll from the dotCover install folder
- wrap the code between breakpoints into calls to CoverageProfiler, e.g.:

using JetBrains.Profiler.Core.Api;

//your code

- In the coverage configuration window (dotCover > Cover Application > Your application type)
press Ctrl+Alt+Shift+F11 to get "Expert Options" button, click it to get options dialog.
In the options dialog choose Control kind = "Use core api".


- Start coverage analysis.
In the end you should get a shapshot which contains info about all the code executed between the breakpoints.

Please let us know if you'll need more details.



Please sign in to leave a comment.