EmmyLuaDebugger icon indicating copy to clipboard operation
EmmyLuaDebugger copied to clipboard

协程无法调试,还有可能闪退

Open yanghui1860 opened this issue 6 months ago • 1 comments

配置信息: vscode为1.91.1 EmmyLua为0.9.19 Unity2019 + xlua launch.json配置: { "type": "emmylua_new", "request": "launch", "name": "EmmyLua New Debug", "host": "localhost", "port": 9876, "ext": [ ".lua", ".lua.txt", ".lua.bytes" ], "ideConnectDebugger": false },

使用下面的代码连上调试器后 local dbg = require('emmy_core') dbg.tcpConnect('localhost', port)

执行协程代码会使断点失效: local co = coroutine.create(function() -- dummy end); coroutine.resume(co)

如果在协程内尝试再连调试器,Unity闪退,调试器也终止 local co = coroutine.create(function() -- dummy local dbg = require('emmy_core') dbg.tcpConnect('localhost', port) end); coroutine.resume(co)

yanghui1860 avatar Jun 27 '25 07:06 yanghui1860

Image 试着加一个dbg.breakHere()

CppCXY avatar Aug 04 '25 12:08 CppCXY