IDE opens different tabs for editing and debugging when the file is behind a symlink
Original Reporter info from Mantis: Artlav
-
Reporter name: Artyom
Original Reporter info from Mantis: Artlav
- Reporter name: Artyom
Description:
Prior discussion in http://forum.lazarus.freepascal.org/index.php/topic,31971.240.html
Does not look similar to issue 31260
Situation (provided in the included file):
In ~/src we have:
linktest.lpi
linktest.pas
link -> real (directory symlink)
real/someunit.pas
linktest.pas uses someunit.
Project have "-link" in the search path (-Fu), and does not have "real" in it's search path.
In the IDE in linktest i ctrl-click on a symbol from someunit.
A new tab opens, with the path of ~/src/link/someunit.pas
Now i set a breakpoint in someunit and run the project.
It reaches the breakpoint and opens a new tab with (2) added to it's name and ~/src/real/someunit.pas as the path.
Now, let's say i close the first tab and keep only the one the debugger opened.
I run the program, and suddenly i have a breakpoint triggerred where none is visibly set.
If i try to type in the debugger's tab and make an error, then on compile the first tab will re-open with the error highlighted.
If i change it in the first tab, i would get a "reload changes from disk" dialog.
Basically, the IDE does not handle well if a source file is inside a symlinked directory.
Expected behavior - in all cases it should open the ~/src/link/someunit.pas
Acceptable behavior - it should consistently either open all in linked paths or all in physical paths. The latter defeats the purpose of symlinks, however.
Steps to reproduce:
- Either download the sample project in the provided file, or:
Make a project with two units.
Put one unit into a separate directory.
Make a symlink of that directory in the project's directory.
Include that symlink into the search path (-Fu)
2.
In the IDE, try ctrl-clicking a procedure from the unit - the tab will open with linked path
Try running a debugger and let it go into the unit (or put a breakpoint there) - a new tab will open with the physical file path instead of the linked one.