-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d8a7eb3
commit 68d2a69
Showing
6 changed files
with
160 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Publish | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
create-release: | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
- name: Checkout cppdap | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: google/cppdap | ||
path: cppdap | ||
- name: Checkout luau | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: luau-lang/luau | ||
path: luau | ||
- name: configure | ||
run: cmake -DCPP_DAP_ROOT=./cppdap -DLUAU_ROOT=./luau -S . -B build --preset publish-configure | ||
- name: build | ||
run: cmake --build --preset publish-build | ||
- name: pack | ||
run: 7z a luaud.zip .\build\luaud\luau.exe | ||
- uses: softprops/action-gh-release@v2 | ||
with: | ||
files: luaud.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Luau debugger | ||
|
||
A debugger for Luau with debug adapter protocol(DAP) support. | ||
|
||
## Overview | ||
|
||
```bash | ||
└── luau_debugger | ||
| | ||
├── debugger # Debugger implementation, include a DAP server and | ||
| # a debugger implemented with luau internal debug | ||
| # api directly without hooking | ||
| | ||
├── luaud # A Luau executable with debugger support, for testing purpose | ||
├── extensions # VSCode extension for Luau debugger | ||
└── tests # Tests with lua scripts | ||
``` | ||
|
||
## Dependencies | ||
|
||
- luau | ||
- cppdap | ||
- C++ DAP(Debug Adapter Protocol) library, help to simplify the implementation of a DAP server | ||
|
||
## Build | ||
- Clone `cppdap` and `luau` repository to local | ||
- Set `CPP_DAP_ROOT` and `LUAU_ROOT` in `CMakePresets.json` | ||
- Build using CMake Presets by CLI | ||
- `cmake -S . -B build --preset <configure preset>` | ||
- `cmake --build --preset <build preset>` | ||
- Or use other IDE such as VSCode or Visual Studio | ||
|
||
## Usage | ||
- Download or build `luaud` executable | ||
- Install `luau-debugger` extension | ||
- Open lua folders in VSCode | ||
- Add a launch configuration in `launch.json` | ||
```json | ||
{ | ||
"configurations": [ | ||
{ | ||
"type": "luau", | ||
"request": "attach", | ||
"name": "attach to luau debugger", | ||
"address": "localhost", | ||
"port": 58000 | ||
} | ||
] | ||
} | ||
``` | ||
- Using `luaud` to execute lua script with debug support | ||
```bash | ||
luaud 58000 <script> | ||
``` | ||
- Press `F5` to start debugging | ||
|
||
## Features | ||
|
||
- [ ] Debugger features | ||
- [x] Attach | ||
- [ ] Launch | ||
- [x] Stop on entry | ||
- [x] Breakpoints | ||
- [x] Add break points when running (Considering thread safety) | ||
- [x] Continue | ||
- [ ] Force break | ||
- [x] StackTrace | ||
- [x] Scopes | ||
- [x] Get variables | ||
- [x] Locals | ||
- [x] Upvalues | ||
- [ ] Display variables | ||
- [x] nil | ||
- [x] boolean | ||
- [x] number | ||
- [x] string | ||
- [x] table | ||
- [x] nested table | ||
- [x] table with cycle reference | ||
- [x] vector | ||
- [x] function | ||
- [ ] userdata | ||
- [ ] Set variables | ||
- [x] Repl | ||
- [x] Watch | ||
- [x] Hover | ||
- [x] Single step | ||
- [x] Step in | ||
- [x] Step over | ||
- [x] Step out | ||
- [x] Disconnect and reconnect | ||
- [ ] Log | ||
- [ ] Coroutine | ||
|
||
## Notice | ||
|
||
- To avoid debug info to be stripped by luau compiler, `Luau::CompileOptions::debugLevel` should be set to `2` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters