Skip to content

Commit 30e4774

Browse files
[pob1-port] Fix: restore docker EmmyLua instructions (#1859)
Co-authored-by: Nightblade <Nightblade@users.noreply.github.com>
1 parent 95d4d82 commit 30e4774

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,15 @@ More tests can be added to this folder to test specific functionality, or new te
226226
Please try to include tests for your new features in your pull request. Additionally, if your pr breaks a test that should be passing please update it accordingly.
227227

228228
### Debugging tests
229-
When running tests with a docker container it is possible to use EmmyLua for debugging. Follow the instructions for inserting the debugger snippet as shown above in [Visual Studio Code](#Visual-Studio-Code), then uncomment the `dbg.waitIDE()` line.
230-
231-
After running `docker-compose up` the code will wait at that line until a debugger is attached. This will allow stepping through any code that is internal to POB but will not work for busted related code. Note that this only works for unit tests described above.
229+
When running tests with a docker container it is possible to use EmmyLua for debugging. Paste in the following right under `function launch:OnInit()` in `./src/Launch.lua`:
230+
```lua
231+
package.cpath = package.cpath .. ";/usr/local/bin/?.so"
232+
local dbg = require("emmy_core")
233+
-- This port must match the IDE Code configuration. Default is 9966.
234+
dbg.tcpListen("localhost", 9966)
235+
dbg.waitIDE()
236+
```
237+
After running `docker-compose up` the code will wait at the `dbg.waitIDE()` line until a debugger is attached. This will allow stepping through any code that is internal to POB but will not work for busted related code. Note that this only works for unit tests described above.
232238

233239
## Path of Building development tutorials
234240

0 commit comments

Comments
 (0)