I can't compile with Visual Code

The “Path to Free Pascal Compiler executable” should be the full filename to the FPC executable, ending like fpc.exe (on Windows). You specified there only the directory, ending with ...x86_64-win64\. Looks like you should just add fpc.exe.

The hint visible at the screenshot above tried to communicate this, but I recognize this was confusing, it said “Path to the Free Pascal Compiler executable…” (which could be interpreted as filename or directory; and in fact right below, for FPCDIR, we say “path” to mean directory…). I improved it now, to say this:

Note: You could also just get CGE from Download | Castle Game Engine , which has a bundled FPC version, and then the bundled FPC would be used automatically.