Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect change and reload #298

Open
emoon opened this issue Aug 9, 2016 · 2 comments
Open

Detect change and reload #298

emoon opened this issue Aug 9, 2016 · 2 comments
Milestone

Comments

@emoon
Copy link
Owner

emoon commented Aug 9, 2016

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)

@emoon emoon added this to the 0.1 milestone Aug 9, 2016
@emoon
Copy link
Owner Author

emoon commented Sep 3, 2016

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

@emoon
Copy link
Owner Author

emoon commented Dec 14, 2016

Change detection now works but breakpoint aren't being moved yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant