Open emoon opened 8 years ago
As tested in VS how it handles this
it has some fuzzy logic testing going on
it attempts to keep the breakpoint on the same line, also attempts to understand if the line has moved down (current line has changed contents AND the same exact line exists further down)
if it can't understand what you did it leaves the breakpoint at the line, assuming that the line is still a statement
if it is not a statement, it will remove the breakpoint (probably because the engine itself refuses to set the breakpoint)
whitespace changes throws it off btw
if you have a bp on line 67 and line 67 does not change contents, the bp will remain
if line 67 has changed, it starts scanning, downward & then upward, for a line with the expected contents it has more logic than this, which enables it to handle the case of "line 67 was modified" but I don't quite understand that yet so it looks to me like one should run a diff engine on pre & post versions of the code
and then do something smart on top of that
Change detection now works but breakpoint aren't being moved yet.
If the user has changed the source from the out-side the source view should detect it and reload it if the user wants.
Also how to deal with breakpoints? (Should the source view try to figure out how to move them if lines gets added etc)