Setting breakpoints
Click in the gutter (left margin) of any.lua file to set a breakpoint. A red dot appears where execution will pause.
You can also set breakpoints from the Run & Debug panel’s Breakpoints section.
Conditional breakpoints
Right-click in the gutter (or on an existing breakpoint) and choose Edit Breakpoint to add a condition:Logpoints
A logpoint prints a message to the Debug Console when execution reaches that line. Right-click in the gutter and choose Add Logpoint:{} evaluate Lua expressions.
Stepping controls
When execution is paused at a breakpoint, use the debug toolbar or keyboard shortcuts:Call stack
When paused, the Call Stack panel shows the full active call stack from the current Lua execution context. Each frame shows:- The function name (or
(anonymous)for unnamed functions) - The source file and line number
Stop on entry
Set"stopOnEntry": true in launch.json (default: true) to pause at the first Lua instruction after connecting. Useful when debugging server startup behavior.
Stop on error
Set"stopOnError": true in launch.json to pause when a Lua error is thrown anywhere on the server, including unhandled errors in hook callbacks.
GLuaLS preserves the call stack at the moment of the error so you can inspect the full execution context.
Break here (manual pause)
To pause at an arbitrary point without a file breakpoint, use the Break Here command:- Open the Command Palette (
Ctrl+Shift+P) - Run Debug: Break Here