Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 11 additions & 44 deletions docs/rgp-lua/development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,50 +94,17 @@ One effective way to do this is to detect modifier keys. If your script has a di
debuggee.start(json, { redirectPrint = true })
```

6. Type <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd> or click on the "Run and Debug" icon in the side bar, then click on the "create a launch.json file" link. From the "Select debugger" dropdown that appears, select `Lua Debugger`. This will create a default `launch.json` file that should look like this:

```json
{
"version": "0.2.0",
"configurations": [
{
"name": "launch-lua",
"type": "lua",
"request": "launch",
"workingDirectory": "${workspaceRoot}",
"sourceBasePath": "${workspaceRoot}",
"executable": "${workspaceRoot}/lua.exe",
"arguments": "main.lua",
"listenPublicly": false,
"listenPort": 56789,
"encoding": "UTF-8",
"env": {}
},
{
"name": "launch-gideros",
"type": "lua",
"request": "launch",
"workingDirectory": "${workspaceRoot}",
"giderosPath": "C:/Program Files (x86)/Gideros",
"gprojPath": "${workspaceRoot}/GPROJ.gproj",
"jumpToGiderosErrorPosition": false,
"stopGiderosWhenDebuggerStops": true,
"listenPublicly": false,
"listenPort": 56789,
"encoding": "UTF-8"
},
{
"name": "wait",
"type": "lua",
"request": "attach",
"workingDirectory": "${workspaceRoot}",
"sourceBasePath": "${workspaceRoot}",
"listenPublicly": false,
"listenPort": 56789,
"encoding": "UTF-8"
}
]
}
6. Type <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd> or click on the "Run and Debug" icon in the side bar, then click on the "create a launch.json file" link. From the "Select debugger" dropdown that appears, select `Lua Debugger`. This will create a default `launch.json` file with a `wait` section that should look like this:

```
"name": "wait",
"type": "lua",
"request": "attach",
"workingDirectory": "${workspaceRoot}",
"sourceBasePath": "${workspaceRoot}",
"listenPublicly": false,
"listenPort": 56789,
"encoding": "UTF-8"
```

8. Launch the `wait` configuration by selecting it from the dropdown at the top of the "Run and Debug" panel and clicking the arrow next to it (or hitting <kbd>F5</kbd>). This tells VS Code to listen for messages from remote execution of your script.
Expand Down