LuaHelper
LuaHelper copied to clipboard
xlua中,有必要引入'libpdebug'吗?如何引入?
这几行LuaPanda源码,会出现这样的错误
--sync breaks to c
if hookLib ~= nil then
hookLib.sync_breakpoints();
end
Error:Editor/LuaPanda:1132: bad argument #-1 to 'sync_breakpoints' (string expected, got nil)
stack traceback:
[C]: in function 'libpdebug.sync_breakpoints'
in function 'Editor/LuaPanda.dataProcess' -(at E:/Project/Saint_Seiya/Client/Trunk/ProjectSaintSeiya/Assets/Res/LuaScripts/Editor/LuaPanda:1132)
in function 'Editor/LuaPanda.receiveMessage' -(at E:/Project/Saint_Seiya/Client/Trunk/ProjectSaintSeiya/Assets/Res/LuaScripts/Editor/LuaPanda:1566)
in function 'Editor/LuaPanda.debugger_wait_msg' -(at E:/Project/Saint_Seiya/Client/Trunk/ProjectSaintSeiya/Assets/Res/LuaScripts/Editor/LuaPanda:1590)
in function 'Editor/LuaPanda.dataProcess' -(at E:/Project/Saint_Seiya/Client/Trunk/ProjectSaintSeiya/Assets/Res/LuaScripts/Editor/LuaPanda:1404)
in function 'Editor/LuaPanda.receiveMessage' -(at E:/Project/Saint_Seiya/Client/Trunk/ProjectSaintSeiya/Assets/Res/LuaScripts/Editor/LuaPanda:1566)
in function 'Editor/LuaPanda.debugger_wait_msg' -(at E:/Project/Saint_Seiya/Client/Trunk/ProjectSaintSeiya/Assets/Res/LuaScripts/Editor/LuaPanda:1590)
in function 'Editor/LuaPanda.connectSuccess' -(at E:/Project/Saint_Seiya/Client/Trunk/ProjectSaintSeiya/Assets/Res/LuaScripts/Editor/LuaPanda:275)
in function 'Editor/LuaPanda.start' -(at E:/Project/Saint_Seiya/Client/Trunk/ProjectSaintSeiya/Assets/Res/LuaScripts/Editor/LuaPanda:247)
in main chunk -(at E:/Project/Saint_Seiya/Client/Trunk/ProjectSaintSeiya/Assets/Res/LuaScripts/Editor/EditorDebug:6)
[C]: in function 'require'
in main chunk -(at E:/Project/Saint_Seiya/Client/Trunk/ProjectSaintSeiya/Assets/Res/LuaScripts/Game:32)
[C]: in function 'require'
[string "chunk"]:1: in main chunk
经过一番研究,我已经发现这个库的位置,VSCode插件会将dll文件位置发送到LuaPanda.tryRequireClib
里。
我尝试通过项目的XLua加载脚本,把这个位置传递给了CustomLoder。也就是进入了 StaticLuaCallbacks.LoadFromCustomLoaders
这个函数中。能读出byte[]。但是仍然会显示
error loading module libpdebug from CustomLoader, 【用户目录】\\.vscode\\extensions\\yinfei.luahelper-0.1.65/Debugger/debugger_lib/plugins/win/x86_64/503/libpdebug.dll:1: syntax error near '<\\144>'"
我们主程确实改过xlua源码。我也不确定是不是他们改出问题了🤣。不过如果有时间我新建一个项目看看
I've got the same issue.
This error happens due to the libpdebug
library expects the breaks
table to be in the format
breaks = { source = { break point arrays } }
but LuaPanda code creates it in format breaks = { short_paht = {full_path = { break point arrays } } }