Skip to content

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

@yanghui1860

Description

@yanghui1860

配置信息:
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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions