Overview
When connected to SRCDS, GLuaLS captures runtime Lua errors in the GLua Errors panel. Each error includes a clickable stack trace that jumps to the offending line in your source files.How it works
Thegm_rdb binary module (installed as part of debugger setup) intercepts Lua errors at the SRCDS runtime level and streams them to the extension over the debug connection.
You do not need a breakpoint. GLuaLS captures errors whenever the debugger is connected.
The Errors panel
Open the Errors panel from the GLuaLS sidebar, or via View → GLua Errors. Each entry shows:- Error message: the Lua error string
- Source: whether it came from a Lua error or the console
- Count: how many times this error occurred, deduplicated by fingerprint
- First / last seen: timestamps
- Stack trace: click any frame to jump to that file and line
Navigating to errors
Click any stack frame in the error entry to open the file and jump to the exact line. GLuaLS resolves short Garry’s Mod file paths, such asaddons/my-addon/lua/my_file.lua:42, to absolute paths in your workspace.
Error sources
| Source | Description |
|---|---|
| Lua | Runtime Lua errors caught by the GMod error system |
| Console | Error-level messages from the SRCDS console output |
Clearing errors
Click the Clear button at the top of the panel to clear all current errors. Errors persist until cleared or until the debug session ends.Stop on error
You can configure the debugger to pause execution when Lua throws an error. This lets you inspect the full call stack at the moment of the error. SetstopOnError: true in your launch.json:
launch.json