tomblind / local-lua-debugger-vscode

Local Lua Debugger for VSCode
MIT License
107 stars 26 forks source link

[Suggestion] Using coxpcall for Lua 5.1 error resolution in coroutines #41

Closed sewbacca closed 3 years ago

sewbacca commented 3 years ago

There is a project, which replaces normal pcall and xpcall calls with coroutine compatible calls. It may be used to get stacktrace in Lua 5.1, which @tomblind mentioned in #29 is problematic.

tomblind commented 3 years ago

I looked into this when exploring that issue, but this method of replacing xpcall doesn't maintain the call stack in the error handler, so it would not allow breaking and inspecting at the error site. It would just break at the resume call as the debugger already does now.

sewbacca commented 3 years ago

Hmmm.... Sorry I didn't tested it before suggesting. I guess I'll close that issue now. Thank you.