Breakpoints outside {} clear when the scala file is saved
Migrated from http://lampsvn.epfl.ch/trac/scala/ticket/1901
Reporter PointyStick
Problem :
Breakpoints set outside {} braces clear when the scala file is trivially edited then saved. The breakpoints disappear from the editor and the Breakpoint window.
Expected outcome :
Breakpoints persist, and behave in the same way as breakpoints inside {} braces
Repro :
0
}
Reporter PointyStick
Problem :
Breakpoints set outside {} braces clear when the scala file is trivially edited then saved. The breakpoints disappear from the editor and the Breakpoint window.
Expected outcome :
Breakpoints persist, and behave in the same way as breakpoints inside {} braces
Repro :
- Create a new scala file
- Write def main() = 0
- Save & Set a breakpoint
- Add a space after the 0, and save again
- Breakpoint disappears
- Now replace with :
0
}
- Save & set a breakpoint on 0
- Add a space after the 0
- Breakpoint persists
Leave a comment
on 2009-04-19 11:05 *
By tracImporter
Trac author: ijuma
CC Change: mlists@…
CC Change: mlists@…
on 2010-06-01 20:26 *
By MattRussell
Break point updates on save are handled by
a ValidBreakpointLocationLocator. I guess the surprising thing is that this works even some of the time! If you're lucky, it'll get enough accidental "Java" structure that it can preserve the breakpoint -- which is why the braces makes a difference. The whole widget really needs swapping out for something Scala aware.
org.eclipse.jdt.internal.debug.ui.BreakpointMarkerUpdater.updateMarkerwhich attempts to parse the source as Java and then fix up the breakpoint positions with
a ValidBreakpointLocationLocator. I guess the surprising thing is that this works even some of the time! If you're lucky, it'll get enough accidental "Java" structure that it can preserve the breakpoint -- which is why the braces makes a difference. The whole widget really needs swapping out for something Scala aware.
on 2010-08-10 17:05 *
By MattRussell
Duplicated association with ticket #1000105 was added
on 2010-08-12 15:59 *
By MattRussell
Duplicated association with ticket #1000105 was added
on 2010-08-23 18:52 *
By MattRussell
Child association with ticket #1000105 was added
I've committed an aspect to disable the BreakpointMarkerUpdater, so breakpoints should be left unmolested.