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.
This AGENTS.md may be copied standalone into other work directories. Treat the
local paths below as relative to the directory containing this file.
Before using any public BAS, Mako, Xedge, Xedge32, OPC UA, or AI-skill URL:
- Look for a local cached copy under
./.agents/reference/rtl/. - If the file is missing and network access is available, download it from the listed source URL and save it there before using it.
- Record the source URL and download date in
./.agents/reference/rtl/manifest.mdor in a short header at the top of the cached file. - Use the local cached copy for normal work.
- Re-fetch the public URL only when the user asks for current/latest guidance, the cached file is missing, or the cached file conflicts with observed runtime behavior.
For fully offline use, copy this AGENTS.md together with the
./.agents/reference/rtl/ directory. If only AGENTS.md is copied into an
offline directory, the cache cannot be populated until network access is
available.
-
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.