1 Replies Last post: Jun 6, 2014 5:43 PM by Ruslan Isakiev  
Jan C. de Graaf - Blijleven Newbie 1 posts since
Jun 6, 2014
Currently Being Moderated

Jun 6, 2014 4:58 PM

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.

Ruslan Isakiev JetBrains 209 posts since
Mar 22, 2010
Currently Being Moderated
Jun 6, 2014 5:43 PM in response to: Jan C. de Graaf - Blijleven
Re: get code covered between 2 breakpoints

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.



More Like This

  • Retrieving data ...