actboy168 / lua-debug

Lua Debug Adapter for Visual Studio Code
MIT License
435 stars 94 forks source link

How to debug a lua script run by c/c++ program #86

Open aengusjiang opened 4 years ago

aengusjiang commented 4 years ago

there is a program a, it will run a lua script when a runing.

Trolldemorted commented 4 years ago

Did you manage to attach the debugger to an embedded lua runtime?

Clevergua commented 8 months ago

不知道目前是否可以调试C启动的lua呢? 一个很简单的案例: lua_State *pLuaState = luaL_newstate(); luaL_openlibs(pLuaState); lua_Hook hook = lua_gethook(pLuaState); int luaResult = luaL_dofile(pLuaState, "C:/Users/Cleve/Documents/GitHub/FurnaceEngine/assets/lua/main.lua"); printf("%d", luaResult);