Closed david-grem-armstrong closed 1 year ago
breakpoint debugging is based on chunkname(it is parameter passed on to lua.Dostring
), if you want the breakpoint to work as expected, you need to make sure that the chunkname is in the correct case and matches the file path, for example:
if chunkname is 'C:/user/desktop/unity project/Assets/Bundle/Lua/Main.lua', it can hit the breakpoint accurately. or 'Lua/Main.lua' also works correctly.
so all you need to do is change the chunkname so that it conforms to the file path(absolute or relative).
another case is that if your rider's version is more than 2021.1, it requires you add lua
to unity>Edit/Project Settings/Editor/C# project generation
and regenerate the sln file and restart Unity.
this way Rider will collect the Lua files correctly
if you have msbuild
you can try https://github.com/CppCXY/EmmyLua-Unity2/actions/runs/3613466359
for get unity api.
It is very likely that it does not work correctly on the Mac
It looks like Regenerating the project .sln after adding .lua to the Project Settings file list was the key. Thanks.
Environment(环境)
What are the steps to reproduce this issue?(重现步骤?)
What happens?(出现什么问题?)
dbg.breakHere() functions as expected, but "Step", "Step Into" and trying to "Resume" to another breakpoint doesn't work.
What were you expecting to happen?(期望?)
Breakpoints and "Step" and "Step Into" should functions as expected
Any logs, error output, etc?(有没有什么log, error输出?)
None
Any other comments?(其它说明)
…