If I have debug on and run into an error, the IDE opens the file and locates the error line. This, on this occasion, was a library file, not the main program.
But if I have that file already opened, it opens a 2nd copy into the IDE when an error occurs.
This is not ideal and can lead to two seperate copies of the same program being edited in the IDE (2 tabs with the same name), which can lead to data loss depending on which copy you last edited then closed.