Samsung / netcoredbg

NetCoreDbg is a managed code debugger with MI interface for CoreCLR.
MIT License
803 stars 103 forks source link

Multiple breakpoints on the same line #83

Open fenixjiang opened 2 years ago

fenixjiang commented 2 years ago
   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?

viewizard commented 2 years ago

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 commented 2 years ago

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.

fenixjiang commented 2 years ago

@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?

viewizard commented 2 years ago

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.