There is a commercial Visual Studio plug-in that will do what you want, but I don't recall it's name.<p>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).