### Lua 環境安裝與 VSCode 設定指南 ✨ 以下是 Lua 開發環境的完整資源整理,從官網下載到 VSCode 除錯設定,一步到位,讓你快速上手!🚀 **📥 Lua 官方資源** - Lua 官網:[https://lua.org](https://lua.org) - Lua 官網下載頁:[https://lua.org/download.html](https://lua.org/download.html) - Lua for Windows(Windows 一鍵安裝超方便):[https://github.com/rjpcomputing/luaforwindows](https://github.com/rjpcomputing/luaforwindows) **🔧 VSCode 必裝擴充套件** - **Lua**(語法提示與自動完成):sumneko.lua - **Lua Debug**(除錯神器):actboy168 - GitHub 專案:[https://github.com/tomblind/local-lua-debugger-vscode](https://github.com/tomblind/local-lua-debugger-vscode) **⚙️ launch.json 除錯設定**(直接複製到 `.vscode/launch.json`) ```json { // 使用 IntelliSense 以得知可用的屬性。 // 暫留以檢視現有屬性的描述。 // 如需詳細資訊,請瀏覽: [https://go.microsoft.com/fwlink/?linkid=830387](https://go.microsoft.com/fwlink/?linkid=830387) "version": "0.2.0", "configurations": [ { "type": "lua", "request": "launch", "name": "Debug", "program": "${workspaceFolder}/hello.lua" } ] } ``` *小提醒:將 `"program"` 路徑改成你的 Lua 檔案即可啟動除錯!🛠️* **🏃‍♂️ Code Runner 快速執行設定** 1. 按 `Ctrl + Shift + P` → 輸入「Preferences: Open Settings (JSON)」 2. 在 `settings.json` 中搜尋 `code-runner.executorMap`,新增 Lua 設定: ```json "code-runner.executorMap": { "lua": "lua" } ``` 這樣用 Code Runner 一鍵跑程式,超省時!⚡ 準備好寫第一個 `hello.lua` 了嗎?print("Hello, Lua World! 🌟") 試試看~