Yes, the garbage collector is called while compiling PacAPI: a breakpoint to Kernel.CallFinalizers was hit, and stepping into the code lead me to the point where HostFiles.File.FINALIZE is called. Then I set a breakpoint in the IF statement of FINALIZE before CloseFile(f, res). This breakpoint was never hit after clicking on Continue, after which the code file appeared in the macOS Finder.Josef Templ wrote:Is the garbage collector called while compiling this file?
Set a breakpoint to Kernel.CallFinalizers after starting the compile command.
If it is hit while compiling the file, it would be interesting if the code file object is finalized,
which of course would be an error.
So I guess the code file HostFiles.File^ (f^) is not finalized during the compilation.
Adding debugging code to HostFiles is way beyond my understanding of this code, so I will refrain from doing that.Alternatively, you could also set a breakpoint at HostFiles.FINALIZE, which is the finalization
procedure called when a file object is deallocated from the heap.
Note: if you add debugging code to HostFiles, you must relink the exe file.
You could use module Console for low-level output.
I hope that setting a breakpoint in the debugger does not equate to adding debugging code, because I wouldn't know how to relink the exe file.
--
Hans