fdorg/flashdevelop — pull request #269 by JoeRobich (2014-06-16 15:55:41+00:00)
Title: When setting Breakpoints use the lowest SourceFile Id.

Background:
For projects that load many modules that all reference core libraries, the same source file may be loaded into the session several times.

The code that determine which location to use when adding breakpoints to
the session uses the first source file with matching path name it
encounter. However, FlashPlayer seems to 'run' the first instance of the source file that was loaded.

This sets up a situation where the found location does not match the
running location. In those situations the breakpoints do not get hit.

Solution:
This fix changes the code that determines which location to use for
breakpoints. Instead of using the first matching location it will use the
location with the lowest source file id.

First change is to default the source file id for new breakpoints to
int.MaxValue, this way any found source file id will be lower. We change
the source file check from looking for unset file id to looking for file
id that is lower than we have found. Next we remove the early exit since
we are unsure when we've found the lowest file id for a location.