lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I wanted to make a Visual Studio .Net (2003) add-in which will add debugging support for lua scripts. The idea is that the add-in will allow you to debug normal C++ code and lua code at the same time i.e. during normal debugging sessions you can set break points in lua scripts (in Visual Studio) and whenever that script is called the debugger will break on that break point in lua code, and you can watch local and global variables in a watch window.

I know about lua_sethook(…) whereby I can set hook to different events whenever a lua vm is executing some code. However, the lua_sethook(…) is dependent on a lua_state. Now my addin will be a separate dll which will have no information of which lua_state instance is executing a particular script. Now I want to know whether such a feat is possible at all or not? Has anyone tried this before? I know about the LuaPlus addin, but it doesn’t work on my studio (will post it on their forum later).

 

Any help shall be appreciated.

 

Regards,

Zulfiqar Inayat Malik.