The handy script below (x4-debug.bat) can be used as a shortcut to start x4 in debug mode. You get:
- All debug messages turned on
- All debug logs sent to a timestamped file, so you dont lose anything
Batch file:
Copy paste the code in the file below, then update the value for X4_EXE_PATH
- change it to wherever X4.exe is located.
Powershell file: Copy paste the code in a file called x4-debug.ps1 and save this file NEXT to your X4.exe file. The script will automatically:
- detect the .exe file
- create a shortcut in the same folder as the x4.exe
- launch the game with the logging enabled
You can then copy the shortcut (which points to the powershell ps1 file) to any folder you like.
Your debug logs will be available in the Documents\Egosoft\X4 Foundations\
folder.
Consider using a log analysis tool like glogg which can help you sort, filter, and find data in the logs.