netcoredbg icon indicating copy to clipboard operation
netcoredbg copied to clipboard

Multiple breakpoints on the same line

Open fenixjiang opened this issue 4 years ago • 5 comments

   var list = new List<int>() {1,2,3,4,5,6,7,8,9};
   var lst1 = list.Where(i => i > 1). Where(i => i< 6).ToList();
                               ^                  ^
                              bp1                bp2   

Set two breakpoint at same line.

Breakpoint 2 will not be hitted when breakpoint 1 is htted and continue. Can breakpoints_line support columns?

fenixjiang avatar Feb 23 '22 03:02 fenixjiang

Hello, We don't plan support this feature. As I know, only VSCode protocol could provide column as optional parameter during breakpoint setup, but I don't know IDE that support this feature.

viewizard avatar Feb 23 '22 10:02 viewizard

BTW, you could debug this could in case you minor alter it, for example:

var lst1 = list.Where(i => 
i > 1). Where(i => 
i< 6).ToList();

in this case if you set breakpoint for 2 and 3 lines, you will have breakpoints where you want.

viewizard avatar Feb 24 '22 13:02 viewizard

@viewizard Yes. it's. My example is just an example, there are many such examples in actual coding.

I found there is a function GetSequencePointCollection in ManagedPart.dll, and SequencePoint contain the line and column. Can we distinguish different breakpoints on the same line by this?

fenixjiang avatar Feb 25 '22 01:02 fenixjiang

Can we distinguish different breakpoints on the same line by this?

Sure. During step, IDE will even show you this (at least VSCode), since debugger return not only line but column too. But we need much more changes for set-line-breakpoint code.

viewizard avatar Feb 25 '22 10:02 viewizard