FiveM · Debugging
FiveM Script Debugging Workflow
The fastest way to fix a FiveM script is to stop guessing. Work from the first real error, confirm the resource shape, then test one change at a time.
Read the first useful error
- Ignore repeated follow-on errors until the first missing file, export, dependency or nil value is fixed.
- Copy the exact console line, resource name and stack trace before changing code.
- Check whether the error appears on server start, player join, command use or menu interaction.
Check the boring files first
- Confirm
fxmanifest.lualists every client, server, shared and UI file. - Make sure dependency resources start before the script that calls their exports.
- Check casing carefully on Linux servers:
Config.luaandconfig.luaare not always the same.
Patch safely
- Make one change, restart the affected resource and test the same trigger again.
- Keep a backup before replacing a live resource folder.
- Add README notes when the fix depends on a specific QBCore, ox_lib or database version.
Use this with Stellar AI
Paste the error, related file and expected behaviour into Stellar so it can produce a focused diagnosis instead of random edits.