mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 07:32:41 +02:00
ide: fix debugging of non-saved units (issue #0011879)
git-svn-id: trunk@18957 -
This commit is contained in:
parent
2612bc98ea
commit
9c4108f86d
@ -1144,8 +1144,8 @@ begin
|
||||
// => fix that
|
||||
Filename := TrimFilename(Filename);
|
||||
SrcFile := Filename;
|
||||
SrcFile := MainIDE.FindSourceFile(SrcFile,Project1.ProjectDirectory,
|
||||
[fsfSearchForProject,fsfUseIncludePaths,fsfUseDebugPath]);
|
||||
SrcFile := MainIDE.FindSourceFile(SrcFile, Project1.ProjectDirectory,
|
||||
[fsfSearchForProject, fsfUseIncludePaths, fsfUseDebugPath]);
|
||||
if SrcFile = '' then SrcFile := Filename;
|
||||
|
||||
if not FilenameIsAbsolute(SrcFile)
|
||||
@ -1168,11 +1168,14 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
if (not FilenameIsAbsolute(SrcFile)) then begin
|
||||
AnUnitInfo:=Project1.FindFile(SrcFile,[pfsfOnlyEditorFiles]);
|
||||
if AnUnitInfo<>nil then begin
|
||||
if not FilenameIsAbsolute(SrcFile) then
|
||||
begin
|
||||
AnUnitInfo := Project1.FindFile(SrcFile, [pfsfOnlyEditorFiles]);
|
||||
if AnUnitInfo <> nil then
|
||||
begin
|
||||
// the file is an unsaved file -> can not be extended
|
||||
exit;
|
||||
Result := True;
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user