IDE: verbosity when unitinfo of srcedit not found

git-svn-id: trunk@40576 -
This commit is contained in:
mattias 2013-03-17 20:06:00 +00:00
parent 81ef0cf3c4
commit 1cfb2f38d8

View File

@ -2031,6 +2031,7 @@ var
AnUnitInfo: TUnitInfo; AnUnitInfo: TUnitInfo;
SaveFileFlags: TSaveFlags; SaveFileFlags: TSaveFlags;
SrcEdit: TSourceEditor; SrcEdit: TSourceEditor;
j: Integer;
begin begin
Result:=mrCancel; Result:=mrCancel;
if not (MainIDE.ToolStatus in [itNone,itDebugger]) then begin if not (MainIDE.ToolStatus in [itNone,itDebugger]) then begin
@ -2086,9 +2087,21 @@ begin
SaveFileFlags:=[sfProjectSaving]+Flags*[sfCheckAmbiguousFiles]; SaveFileFlags:=[sfProjectSaving]+Flags*[sfCheckAmbiguousFiles];
if AnUnitInfo = nil if AnUnitInfo = nil
then begin then begin
// consistency check // inconsistency detected, write debug info
DebugLn(['TLazSourceFileManager.SaveProject - unit not found for page ',i,' File="',SrcEdit.FileName,'"']); DebugLn(['TLazSourceFileManager.SaveProject - unit not found for page ',i,' File="',SrcEdit.FileName,'" SrcEdit=',dbgsname(SrcEdit),'=',dbgs(Pointer(SrcEdit))]);
DumpStack; DumpStack;
debugln(['TLazSourceFileManager.SaveProject Project1 has the following information about the source editor:']);
AnUnitInfo:=Project1.FirstUnitWithEditorIndex;
while AnUnitInfo<>nil do begin
for j:=0 to AnUnitInfo.EditorInfoCount-1 do begin
dbgout([' ',AnUnitInfo.Filename,' ',j,'/',AnUnitInfo.EditorInfoCount,' Component=',dbgsname(AnUnitInfo.EditorInfo[j].EditorComponent),'=',dbgs(Pointer(AnUnitInfo.EditorInfo[j].EditorComponent))]);
if AnUnitInfo.EditorInfo[j].EditorComponent<>nil then
dbgout(AnUnitInfo.EditorInfo[j].EditorComponent.FileName);
debugln;
end;
debugln([' ',AnUnitInfo.EditorInfoCount]);
AnUnitInfo:=AnUnitInfo.NextUnitWithEditorIndex;
end;
end else begin end else begin
if AnUnitInfo.IsVirtual if AnUnitInfo.IsVirtual
then begin then begin