Overview
GLuaLS includes a full source-level debugger for Garry’s Mod servers. You can set breakpoints, step code, inspect variables, edit values, and run Lua from VS Code while the game is running. The VS Code extension can download the rightgm_rdb build and guide you through installation.
How it works
The debugger uses the LRDB (Lua Remote Debugger) protocol over TCP:- gm_rdb: a Garry’s Mod binary module loaded by SRCDS. It talks to the game engine and exposes a TCP debug endpoint.
- GLuaLS Extension: the VS Code extension connects to the TCP endpoint started by the binary module. It sends commands and receives data.
Requirements
- SRCDS (dedicated server) running on Windows or Linux
gm_rdbbinary module installed in your server’sgarrysmod/lua/bin/debug.lualoader script ingarrysmod/lua/autorun/- VS Code with the GLuaLS extension
- Network access from your machine to the server (for remote debugging)
Feature summary
| Feature | Details |
|---|---|
| Breakpoints | Line breakpoints in any .lua file in your workspace |
| Conditional breakpoints | Break only when a Lua expression is true |
| Step over / into / out | Standard stepping controls |
| Call stack | Full call stack with source locations |
| Variable inspection | Locals, globals, and upvalues at each stack frame |
| Variable editing | Modify variable values while paused |
| Expression evaluation | Evaluate Lua expressions in the Debug Console |
| Stop on error | Pause when Lua throws an error |
| Stop on entry | Pause at the first line when connecting |
| Lua execution | Run Lua code, files, or commands from the debug toolbar |
| Entity explorer | Browse entity properties and NetworkVars in a tree view |
| Realm targeting | Send code to the client or server realm independently |
Next steps
Setup & installation
Install gm_rdb and configure launch.json
Breakpoints & stepping
Set breakpoints and control execution flow
Inspecting variables
Examine locals, globals, and upvalues
Entity explorer
Browse entities and their properties