Remote Lua Debugging

From Journey Modding Wiki
Revision as of 14:53, 27 July 2022 by Wolf109909 (talk | contribs)
Jump to navigation Jump to search

Here is a brief example and explanation of how to remotely debug embedded Lua in Journey.

1.Build from the latest sourcecode in https://github.com/wolf109909/Journey_Detour or directly download the prebuilt binaries from the link here(please contact wolf109909#5291 on discord for password, we need to verify that you won't do bad stuff with this xD)

2.Put everything in the root folder of your Journey install folder, and inject the dll into journey process after you enter the Main menu of the game.(Might cause race condition and crash if you do it while the game is running heavy lua stuff)

3.Install Vscode with the vscode-lrdb extension.

4.Create a .vscode folder in the root directory of your Journey, and create a new file called launch.json

5.In launch.json ,paste the following example: ``` {

    //Journey lrdb example

    "version": "0.2.0",

    "configurations": [

        {

            "type": "lrdb",

            "request": "attach",

            "name": "Attach to journey Lua",

            "host": "127.0.0.1",

            "port": 21110,

            "sourceRoot": "${workspaceRoot}",

            "stopOnEntry": true

        }

    ]

} ```