On Wed, 26 Mar 2014, Michael Van Canneyt wrote:


The problem is easy to reproduce, as Mattias demonstrated.

During debugging, Lazarus consistently opens a file twice (or doesn't find it at all) when symlinks are used in the path to the project file, because there is a mismatch between the relative path as lazarus sees it (logical), and the relative path as FPC sees it (physical), and lazarus uses the debug info to open the file.

To demonstrate that the problem is real:

Attached is a screenshot. Remark that the same files are opened twice.

How did I get there ? Simple:

I have /home/michael/FPC/trunk as my copy of FPC trunk.

I have a symlink /home/michael/fpc pointing to the trunk directory.

I opened a project /home/michael/fpc/utils/pas2js/pas2js.lpr (used the symlink), with all files in /home/michael/fpc/packages/fcl-js/src opened in the ide. I put a breakpoint in jsparser.pp.

I hit run, and when hitting the breakpoints, Lazarus opens the source files 
AGAIN,
but now with base path /home/michael/FPC/trunk, and appends a (2) after the 
filename.

Extremely annoying, and since I do a lot of work in trunk, I stopped using the symlinked directories when opening files.

Just to show that this is not some freak occurrence, but a major PITA.

Michael.

<<attachment: error.png>>

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to