在VScode里面下载Emmylua
打开你的代码文件夹
在run and debugger里面
创建一个launch.json到自己的代码项目文件夹
将最后一个属性设置成为false,这样可以让代码端这里等待UE的调试
在需要调试的代码文件开头,加上这样的路径,路径名根据自己的文件路径而定
package.cpath = package.cpath .. ";C:/Users/V_zraycheng/.vscode/extensions/tangzx.emmylua-0.9.15-win32-x64/debugger/emmy/windows/x64/?.dll"
local dbg = require("emmy_core")
dbg.tcpConnect("localhost", 9966)