Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#76 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
lua, unity, vscode

Research direction

Start with the emmy_core tcpConnect calls and the coroutine.create/coroutine.resume reproductions in the issue, using the shown VS Code, EmmyLua, Unity, and xlua versions. Investigate why a resumed coroutine disables breakpoints and why reconnecting from inside it crashes Unity. Done means both coroutine cases no longer lose debugging or terminate the debugger.

Written by the indexing model from the issue text.

Description

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

Dominant language
C++
Stars
253
Forks
99
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EmmyLua/EmmyLuaDebugger

All issues in EmmyLua/EmmyLuaDebugger

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.