Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xlua中,有必要引入'libpdebug'吗?如何引入? #39

Open
oOtroyOo opened this issue Nov 2, 2021 · 1 comment
Open

xlua中,有必要引入'libpdebug'吗?如何引入? #39

oOtroyOo opened this issue Nov 2, 2021 · 1 comment

Comments

@oOtroyOo
Copy link

oOtroyOo commented Nov 2, 2021

这几行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源码。我也不确定是不是他们改出问题了🤣。不过如果有时间我新建一个项目看看

@moteus
Copy link

moteus commented Jan 2, 2022

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 } } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants