Template directory
"luadebug.luaTemplatesDir": "${workspaceFolder}/Template"
Leave empty to use bundled templates. After editing template files, reload the window so they take effect.
FunTemplate/— built-in function templates (do not delete casually)FileTemplates/— optional templates for new files
FunTemplate
AutoFunComment.lua
Function comment template. Typing --- above a function applies it. Reload the window after edits.
CreateFunctionTemplate.lua
Select a function name → right-click Create Function → enter arity and parameter names.
CreateModuleFunctionTemplate.lua
Create a module function; you can also run the matching LuaDebug command from the command palette.
FileTemplates
- Add e.g.
luaTemplate.luaunder FileTemplates with the default body. - Reload the window.
- Right-click in Explorer or the editor → Create template file → pick a template → enter a file name.
File name & moduleName
luadebug.inputTemplateModuleName:
false(default) — file name equals moduleNametrue— prompt for moduleName when creating
Macro variables
luadebug.macroList declares template macros; placeholders in templates are replaced on create.
Add names and values in Settings; placeholder names in templates must match the macro names.