3 ms·
I'm not concerned about single-language debugging. Can these debuggers move through a mixed C-Lua stack? My stack might start and end in C, but cross through
by jedbrown 17y ago
I'm not concerned about single-language debugging. Can these debuggers move through a mixed C-Lua stack? My stack might start and end in C, but cross through Lua two or more times. Can I set a watchpoint and get the program to stop wherever the memory is modified, regardless of which language is modifying it (i.e. I'd like to see C source when C touches the memory and Lua source (not interpreter inernals) when Lua code touches it).
Which of the Lua debuggers is your favorite?
- silentbicycle 17y agoI'm more of an assert / test suite / REPL and printf debugging person. I've used gdb when debugging wrappers for C libraries, but my use of the Lua debugging API has mostly been for profiling, code coverage, etc. GDB works across the language boundary, though. As far as it's concerned, Lua is just a C library.
- corysama 17y agoThere is a commercial Visual Studio plug-in that will do what you want, but I don't recall it's name. I wrote a Lua remote debugger myself years ago. A nice trick was that you can associate a string with a chunk of code when you load the code. Then you can retrieve that string from the debug API based on the current instruction. I used that to make a table of "chunk name" to "source" as a global variable in LUA. That made it easy for the debugger to retrieve the source regardless of where it came from (file vs interactive console vs who knows what).