Skip to main content
Developer Path20 minutesBeginner

Dev Environment Setup

Set up your FiveM development environment from scratch. VS Code, extensions, local server, and debugging workflow.

Prerequisites

  • A computer with at least 8GB RAM
  • Windows 10/11 or Linux
  • Internet connection for downloads

1.Install VS Code

VS Code is the standard editor for FiveM development. It's free, fast, and has the best Lua support.

  • Download from code.visualstudio.com
  • Install with default settings
  • Open VS Code after installation

2.Essential Extensions

  • Lua by sumneko — syntax highlighting, IntelliSense, linting (REQUIRED)
  • FiveM Natives — autocomplete for all FiveM native functions
  • Prettier — auto-format your code on save
  • GitLens — git blame, history, and diff tools
  • Error Lens — show errors inline next to the code
.vscode/settings.json
{
  "Lua.diagnostics.globals": [
    "Config", "RegisterNetEvent", "TriggerEvent",
    "TriggerServerEvent", "TriggerClientEvent",
    "RegisterCommand", "GetPlayerPed", "PlayerPedId",
    "exports", "MySQL", "lib"
  ],
  "Lua.runtime.version": "Lua 5.4",
  "editor.formatOnSave": true,
  "editor.tabSize": 4
}

3.Local FiveM Server

You need a local server for testing. This runs on the same machine as your FiveM client.

  • Download server artifacts from runtime.fivem.net/artifacts/fivem/build_server_windows/master/
  • Extract to C:\FXServer\ (or any path without spaces)
  • Run FXServer.exe — txAdmin opens in browser
  • Complete txAdmin setup with a framework template
  • Your resources go in: C:\FXServer\server-data\resources\[local]\

Keep your development resources in a [local] subfolder. This keeps them separate from framework resources and makes it easy to copy them to your production server later.

4.Development Workflow

  • 1. Edit code in VS Code and save
  • 2. In txAdmin or F8 console: /refresh then /restart [resource-name]
  • 3. Check F8 console for client errors (red text)
  • 4. Check txAdmin console for server errors
  • 5. Use print() for debugging (shows in F8 or txAdmin)
  • 6. Use resmon 1 in F8 to check performance impact

You don't need to restart the entire server for most changes. Just restart the specific resource you're working on.

5.Database Tools

For scripts that use a database, you'll need a GUI tool to view and edit data:

  • HeidiSQL (Windows) — lightweight, fast, free
  • DBeaver (cross-platform) — feature-rich, supports all databases
  • Connect to: localhost:3306 with your FiveM database credentials
  • Use this to inspect tables, run queries, and debug data issues

Dev Environment Ready

Your development environment is set up with VS Code, Lua IntelliSense, a local FiveM server, and database tools. You're ready to start building scripts.