VS CODE EXTENSION

Table of Contents

  1. Farming Simulator IDE Support for VS Code
  2. Installation
  3. Getting started
  4. Lua IntelliSense
  5. Lua editing helpers
  6. XML schema support
  7. XML editing helpers and formatting
  8. File path validation and previews
  9. Shader language support
  10. Lua debugger
  11. Script hot-reload
  12. Density map and image viewers
  13. Luadoc viewer
  14. Game log viewer
  15. Shortcuts

Farming Simulator IDE Support for VS Code

The Farming Simulator IDE Support extension turns Visual Studio Code into a full development environment for Farming Simulator mods and GIANTS Engine scripts. It replaces the GIANTS Studio as the recommended tool for creating, editing and debugging script mods.

Feature overview:

  • Lua IntelliSense with completion, hover documentation and diagnostics for the full engine API
  • XML schema validation and auto-completion for vehicle XMLs, map XMLs, mod descriptors and more
  • Full interactive Lua debugger that attaches to a running game or GIANTS Editor
  • Script hot-reload into the running game without restarting
  • GIANTS Shader Language (GSL) and shader XML support
  • Built-in viewers for density maps (.grle/.gdm) and textures (.png/.dds)
  • Interactive documentation browser for all engine Lua functions and shader builtins
  • Live game log output with clickable error locations

Installation

Install Visual Studio Code, open the Extensions view (Ctrl+Shift+X) and search for "Farming Simulator IDE Support" by GIANTS Software, then click Install — or install it directly from the official Visual Studio Marketplace page. A Farming Simulator installation is required for full functionality — the engine API stubs, path resolution and debugging all depend on it.


Getting started

1. Open your workspace
Open the folder that contains the scripts you want to work on — your mod folder, or a folder with your scripts — as the VS Code workspace (File > Open Folder…). When the folder is detected as a Farming Simulator project, the language, debugging and stub features engage automatically.

2. Trust the workspace
VS Code opens unfamiliar folders in Restricted Mode, which blocks the bundled language server, debugger and stub generation from running. When prompted, choose Yes, I trust the authors.

3. Point the extension at your game and editor
The extension auto-detects an installed game and GIANTS Editor on Windows. If auto-detection cannot find your install, set the game installation directory via the command FS Lua: Set Game Path and the GIANTS Editor installation directory via FS Lua: Set Editor Path.

4. Check the status bar
Three status-bar items tell you whether everything is wired up: the language server state (shows "Ready" once IntelliSense is live), the game info item (detected game name and version) and the debug listener (shows "Listening" while waiting for a connection and "Game Connected" once the game or editor attaches).

5. Connect the game or editor to VS Code
The extension listens for an incoming debug connection as soon as the workspace activates, so you do not have to start a debug session first. In the game, press F10 to connect to VS Code; in the GIANTS Editor, choose Scripts > Connect to Studio. When the connection arrives, a debug session starts automatically and your breakpoints become active.


Lua IntelliSense

The extension bundles a Lua language server configured specifically for GIANTS Engine development. IntelliSense for the engine API — engine functions, globals, classes and enums — is generated automatically when the workspace activates.

  • Auto-completion for all Lua symbols, engine globals and class methods
  • Hover documentation showing function signatures, parameter types and descriptions
  • Go to Definition / Peek Definition and Find All References across the workspace
  • Signature help showing parameter info as you type
  • Diagnostics for syntax errors, type mismatches and undefined globals
  • GIANTS conventions — the project’s doc-comment style, Class(Child, Parent) inheritance and superClass() return types are all understood automatically


Lua editing helpers

Hex color preview: inline color swatches for hex color values in Lua code; click the swatch to open the native VS Code color picker and edit the value in place.


Callback generation: when an engine async function is passed a callback name that does not exist yet, a Quick Fix (Ctrl+.) generates the callback stub with the correct signature.

String format validation: string.format, string.namedFormat and the Logging.* wrapper calls are validated against the placeholders in the format string — argument count and argument type mismatches are flagged as warnings.


Luadoc generation: generate the GIANTS-style doc block for a Lua function with one command (Ctrl+Shift+D for the function under the cursor, or a whole-file variant).


XML schema support

Full XSD-based support for GIANTS Engine XML files (vehicle XMLs, map XMLs, mod descriptors, etc.). Schema validation requires the XML header to reference the correct GDN schema URL for the file’s root element.

  • Auto-completion for XML element names, attribute names and attribute values
  • Hover documentation showing element descriptions, types and default values
  • Diagnostics for missing required attributes, unknown elements and type mismatches
  • Quick fixes for broken or missing schema references and outdated $data/ paths
  • i3d mapping completions — node attributes get completion items from the <i3dMapping> entries in the current document
  • Color preview — inline swatches and a color picker for color attributes
  • Moving parts validation — missing dependencies and invalid reference nodes in vehicle moving parts/tools are flagged


XML editing helpers and formatting

  • Toggle Line Comment (Ctrl+/) and Toggle Block Comment (Shift+Alt+A) with automatic neutralization of nested comments
  • Invert Animation — swaps startTime/endTime (and matching start/end attribute pairs) on every part of the animation under the cursor
  • Mirror Left/Right — duplicates the selected XML block and rewrites Left/Right names and index pairs so a mirrored side can be generated from one authored side
  • Copy Path — copies the engine-style XML path of the element or attribute under the cursor, the same key you pass to xmlFile:getString(…) in Lua
  • Format Document (Shift+Alt+F) — consistent indentation and attribute spacing, with attribute columns aligned across consecutive elements of the same tag


File path validation and previews

XML attribute values and Lua string literals that reference files on disk get path completion and an existence check. $data/ and mod-relative prefixes are resolved to actual directories, referenced files become clickable links, and a warning is shown when a reference matches a file only by ignoring letter case (which works on Windows but fails in the game at runtime).



Hovering over an image path in a Lua or XML file shows an inline thumbnail preview — including textures referenced by their .png name but shipped as a .dds on disk. Hovering a materialTemplateName attribute previews the brand material template’s color and title.




Shader language support

Support for GIANTS Engine shader files: syntax highlighting for shader XML definitions and GSL (GIANTS Shader Language) source, plus auto-completion, hover documentation and signature help for built-in shader functions and structs.



Lua debugger

A full interactive debugger for GIANTS Engine Lua scripts that attaches to a running game or GIANTS Editor instance. Press F10 in the game (or Scripts > Connect to Studio in the editor) and a debug session starts automatically — or launch the game directly from VS Code with F5 using a launch configuration.

  • Breakpoints — including conditional breakpoints that only stop when an expression is true
  • Step Over / Step Into / Step Out / Continue — standard debugger controls
  • Call stack with source locations
  • Variables — inspect local variables and the global table with full tree expansion, plus a dedicated FS Variables panel with a live search box that filters without collapsing expanded tables
  • Watch expressions — evaluate arbitrary Lua expressions
  • Debug Console — auto-completion for globals, locals and table members; bare values are printed automatically, tables and enums print their contents recursively
  • Hover evaluation — hover over variables in the editor to see their values while paused



Script hot-reload

Reload the current Lua file in the running game without restarting, via the command FS Lua: Reload Script in Game (Ctrl+R in a .lua file). Available while a debug session is active.


Density map and image viewers

Density map viewer: built-in viewer for GIANTS density map files (.grle and .gdm) with pan and zoom, per-pixel value inspection, highlighting for low bit-depth maps, PNG export and a bit-depth conversion dialog.


Image viewer: built-in viewer for .png and .dds texture files with pan and zoom, per-pixel RGBA readout, DDS mip level selection, an optional pixel grid, color copying in engine linear RGB format, and a UI-atlas slice overlay when a texture atlas XML sits next to the image.


Luadoc viewer

An interactive documentation browser for all engine Lua functions and shader builtins, accessible from the VS Code activity bar. Browse functions by category, search by name, description or parameter names, and view full signatures, argument tables, return values and enums.



Game log viewer

Live game log output directly in VS Code, automatically following the latest log file. Errors and warnings are color-coded, script paths in log lines open the file at the right line, and repeated identical error blocks are collapsed. Output appears in the FS Game Log output channel (View > Output > FS Game Log).


Default keyboard short-cuts

KeyFunction
Ctrl-RReload script in game (.lua files)
Ctrl-Shift-DGenerate Lua function documentation (.lua files)
Ctrl-/Toggle XML line comment (.xml files)
Shift-Alt-AToggle XML block comment (.xml files)
Shift-Alt-FFormat XML document
F5Launch game with debugger / continue execution
F9Toggle breakpoint
F10Step over
F11Step into
Shift-F11Step out