Skip to content

Commit 1c0dc59

Browse files
chore: autopublish 2023-01-28T19:13:41Z
1 parent 852a5cf commit 1c0dc59

3 files changed

Lines changed: 34 additions & 2 deletions

File tree

-7.48 KB
Binary file not shown.
-10.9 KB
Binary file not shown.

docs/rgp-lua/development-environment.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,28 @@ One effective way to do this is to detect modifier keys. If your script has a di
5555

5656
3. Inside the folder, edit `packages.json`, deleting the `enableBreakpointsFor` element under `debuggers` and adding a `breakpoints` element under `contributes`.
5757

58-
![Manifest Diff](assets/manifest_diff.png "Manifest Diff")
58+
```diff
59+
--- package.json.original
60+
+++ package.json.revised
61+
@@ -21,21 +21,21 @@
62+
"devDependencies": {},
63+
"contributes": {
64+
+ "breakpoints": [
65+
+ {
66+
+ "language": "lua"
67+
+ }
68+
+ ],
69+
"debuggers": [
70+
{
71+
"type": "lua",
72+
"label": "Lua Debugger",
73+
- "enableBreakpointsFor": {
74+
- "languageIds": [
75+
- "lua"
76+
- ]
77+
- },
78+
"program": "./DebugAdapter.exe",
79+
```
5980

6081
4. If VS Code was open, close and restart it. You may then be prompted to reload the window when VS Code notices that the extension has changed on disk.
6182

@@ -75,7 +96,18 @@ One effective way to do this is to detect modifier keys. If your script has a di
7596

7697
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` that should include this snippet at the bottom of the file:
7798

78-
![launch.json](assets/launch_json.png "launch.json")
99+
```json
100+
{
101+
"name": "wait",
102+
"type": "lua",
103+
"request": "attach",
104+
"workingDirectory": "${workspaceRoot}",
105+
"sourceBasePath": "${workspaceRoot}",
106+
"listenPublicly": false,
107+
"listenPort": 56789,
108+
"encoding": "UTF-8"
109+
}
110+
```
79111

80112
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.
81113

0 commit comments

Comments
 (0)