Skip to content

Commit 69501cc

Browse files
authored
Fix: restore docker EmmyLua instructions (#9851)
1 parent 0fc3283 commit 69501cc

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
@@ -224,9 +224,15 @@ More tests can be added to this folder to test specific functionality, or new te
224224
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.
225225

226226
### Debugging tests
227-
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.
228-
229-
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.
227+
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`:
228+
```lua
229+
package.cpath = package.cpath .. ";/usr/local/bin/?.so"
230+
local dbg = require("emmy_core")
231+
-- This port must match the IDE Code configuration. Default is 9966.
232+
dbg.tcpListen("localhost", 9966)
233+
dbg.waitIDE()
234+
```
235+
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.
230236

231237
## Path of Building development tutorials
232238

0 commit comments

Comments
 (0)