diff --git a/components/codetools/codecache.pas b/components/codetools/codecache.pas index fa952ad29c..01ced83a87 100644 --- a/components/codetools/codecache.pas +++ b/components/codetools/codecache.pas @@ -589,8 +589,11 @@ begin if FilenameIsAbsolute(AFilename) then begin if Result=nil then begin // load new buffer - if (not FileExistsCached(AFilename)) then - exit; + {$IFnDEF FixCodeCacheLoadFileBug} + // This line is wrong. The file is not in cache and we should not exit here. + // For some reason removing the line breaks debugger, that's why the IFnDEF + if (not FileExistsCached(AFilename)) then exit; + {$ENDIF} if DirectoryCachePool<>nil then DiskFilename:=DirectoryCachePool.FindDiskFilename(AFilename) else