This example supports the Lua and LSP debugging tutorial using Mako Server, Visual Studio Code, the Lua Debug extension, and the BAS debug monitor. It includes a primary debug target app and a helper FileServer app for remote debugging/source mapping.
As written, this is Mako Server focused. It can be adapted by AI for Xedge-style workflows, but that requires changing debug monitor startup, app loading, restart assumptions, and source mapping behavior.
README.md- required debugger setup and workflow.www/.preload- debug monitor startup and module loading.www/.vscode/launch.json- VS Code debug client configuration.www/index.lsp- LSP debug target.www/.lua/Markow-Chain.lua- Lua module used for stepping and breakpoints.FileServer/files when working on remote debugging support.
Do not invent Mako debug monitor, VS Code launch, LSP, module loading, or restart APIs.
-
BAS documentation bundle (
basapi.md)
https://realtimelogic.com/downloads/basapi.md -
BAS tutorials bundle (
tutorials.md)
https://realtimelogic.com/downloads/tutorials.md -
Mako Server tutorials bundle (
tutorials.md)
https://makoserver.net/download/tutorials.md
Reference priority:
basapi.mdfor API syntax, signatures, and behavior.tutorials.mdfor architecture, security, deployment, and tutorial context.- If tutorial guidance conflicts with API details, trust the API reference.
www/.preload- loads the debug monitor and the Markow Chain module.www/.vscode/launch.json- debugger connection and source mapping configuration.www/index.lsp- browser-triggered LSP page for debugging.www/.lua/Markow-Chain.lua- Lua module for stepping/breakpoint practice.FileServer/.preloadandFileServer/index.lsp- helper app for remote debugging and generated launch configuration.
- Preserve Mako Server debugger workflow unless the user explicitly asks for Xedge adaptation.
- If adapting to Xedge, state which Mako assumptions are being replaced: app loading, debug monitor connection, source mappings, and restart behavior.
- Keep
.preload,.lsp, and.configfile association guidance aligned with README instructions. - Avoid editing generated or environment-specific
launch.jsonpaths without confirming the user's debugger location.
cd Lua-Debug
mako -l::wwwVerify Mako prints that the debug monitor is waiting on port 4711, open Lua-Debug/www in VS Code, start the debugger, and confirm it halts in .preload or the LSP page as described in the README.