Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-06

When debugging, it open multiple copies of the same file

7 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Something that seems to be happening more and more in Lazarus IDE, is that while I debug, and set breakpoints, and run my application via the IDE. Instead of the IDE breaking at the breakpoint and using the exist (already openned unit), the IDE opens yet another unit with a number appended (eg: myunit(2)).

To make matters worse, that new duplicate unit that the IDE opened doesn't contain the breakpoints (at least they are not visible - no red dots in the gutter). So they IDE gets rather confused when you try and set/unset more breakpoints.

Is all this a known problem, or is it just my isolated issues with the IDE again? I tried to search Mantis, but as we all know Mantis (and the wiki's) search functionality sucks big time.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 7 lines
Hi, Something that seems to be happening more and more in Lazarus IDE, is that while I debug, and set breakpoints, and run my application via the IDE. Instead of the IDE breaking at the breakpoint and using the exist (already openned unit), the IDE opens yet another unit with a number appended (eg: myunit(2)).

Maybe you use symlinks?
Please compare the full file names of both editor files.

Show quoted text 8 lines
To make matters worse, that new duplicate unit that the IDE opened doesn't contain the breakpoints (at least they are not visible - no red dots in the gutter). So they IDE gets rather confused when you try and set/unset more breakpoints. Is all this a known problem, or is it just my isolated issues with the IDE again? I tried to search Mantis, but as we all know Mantis (and the wiki's) search functionality sucks big time.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: On Mon, 06 Jun 2011 12:02:06 +0200 Maybe you use symlinks? Please compare the full file…
Mattias Gaertner wrote
Maybe you use symlinks?

Ah, I do have some directory symlinks - never file symlinks though. eg:

$HOME/prog/3rdParty/onguard/ -> /opt/git/onguard.git/ $HOME/prog/3rdParty/tiOPF2/Source/ -> /opt/git/tiopf_svn.git/

I always reference the files inside the 3rdParty/* directories, never the symlink target location (/opt/git/*). So I guess Lazarus IDE doesn't work too well with symlink'd directories then. I guess I can shuffle my directories around and see if that solves the problem. Thanks for the hint.

Please compare the full file names of both editor files.

OK, I'll double check that too.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 15 lines
On 06/06/2011 12:10, Mattias Gaertner wrote: > > Maybe you use symlinks? Ah, I do have some directory symlinks - never file symlinks though. eg: $HOME/prog/3rdParty/onguard/ -> /opt/git/onguard.git/ $HOME/prog/3rdParty/tiOPF2/Source/ -> /opt/git/tiopf_svn.git/ I always reference the files inside the 3rdParty/* directories, never the symlink target location (/opt/git/*). So I guess Lazarus IDE doesn't work too well with symlink'd directories then. I guess I can shuffle my directories around and see if that solves the problem. Thanks for the hint.

Lazarus is mostly symlink agnostic. For example /A/unit1.pas and /B/unit1.pas are different files, even though they may be the same through symlinks. This is needed, because all search paths are relative.

> Please compare the full file names of both editor files. OK, I'll double check that too.

Mattias

Reply by email

Unknown author
to Mattias Gaertner
Mattias Gaertner wrote 22 lines
On Mon, 06 Jun 2011 12:31:15 +0200 Graeme Geldenhuys wrote: > On 06/06/2011 12:10, Mattias Gaertner wrote: >> >> Maybe you use symlinks? > > Ah, I do have some directory symlinks - never file symlinks though. > eg: > > $HOME/prog/3rdParty/onguard/ -> /opt/git/onguard.git/ > $HOME/prog/3rdParty/tiOPF2/Source/ -> /opt/git/tiopf_svn.git/ > > > I always reference the files inside the 3rdParty/* directories, never > the symlink target location (/opt/git/*). So I guess Lazarus IDE doesn't > work too well with symlink'd directories then. I guess I can shuffle my > directories around and see if that solves the problem. Thanks for the hint. Lazarus is mostly symlink agnostic. For example /A/unit1.pas and /B/unit1.pas are different files, even though they may be the same through symlinks. This is needed, because all search paths are relative.

Isn't it planned to make references to used packages absolute ? Or better, is there a reason why you would not make them absolute ? To me, it makes no sense to refer to external packages using relative references. I often have problems because of symlinks.

I can understand that within a package/project you use relative references;
you can then move a package/project, and it will continue to work.

But when moving one package, any link to it will be broken, whether it is relative or absolute. Since an absolute link avoids symlink problems, their use seems preferable to me.

Michael.

Reply by email

Mattias Gaertner
to Unknown author
Show quoted text 28 lines
On Mon, 6 Jun 2011, Mattias Gaertner wrote: > On Mon, 06 Jun 2011 12:31:15 +0200 > Graeme Geldenhuys wrote: > >> On 06/06/2011 12:10, Mattias Gaertner wrote: >>> >>> Maybe you use symlinks? >> >> Ah, I do have some directory symlinks - never file symlinks though. >> eg: >> >> $HOME/prog/3rdParty/onguard/ -> /opt/git/onguard.git/ >> $HOME/prog/3rdParty/tiOPF2/Source/ -> /opt/git/tiopf_svn.git/ >> >> >> I always reference the files inside the 3rdParty/* directories, never >> the symlink target location (/opt/git/*). So I guess Lazarus IDE doesn't >> work too well with symlink'd directories then. I guess I can shuffle my >> directories around and see if that solves the problem. Thanks for the hint. > > Lazarus is mostly symlink agnostic. For example /A/unit1.pas > and /B/unit1.pas are different files, even though they may be the same > through symlinks. This is needed, because all search paths are relative. Isn't it planned to make references to used packages absolute ?

No. Packages are referenced by their name or by relative file names.

Or better, is there a reason why you would not make them absolute ?

You can work with a project on multiple computers.

To me, it makes no sense to refer to external packages using relative references. I often have problems because of symlinks.

I'm not sure why you come up with packages. This thread is about files in general.

I can understand that within a package/project you use relative references; you can then move a package/project, and it will continue to work.

Yes.

But when moving one package, any link to it will be broken, whether it is relative or absolute. Since an absolute link avoids symlink problems, their use seems preferable to me.

Moving a package without telling the IDE is the same as moving a file in a project without telling the IDE: asking for trouble. The solution is simple: tell it.
In case of a package it is ridcully easy: Just open the lpk file.

Mattias

Reply by email