From: Paul K <pau...@ya...> - 2012-08-28 00:41:46
|
Hi Milind, I quickly tried that in wxLua, but couldn't figure out how to specify the folder to run scripts in so that loadfile and io.open would work. I also tried to do this in ZeroBrane Studio (https://github.com/pkulchenko/ZeroBraneStudio) and it seems like it may work for you (the IDE is wxlua based). I'm not sure what your code looks like, but let's say you have loadedfile.lua script that you are trying to load and it has the following lines: -- loadedfile.lua print "123" print "456" function foo() print "foo" end You also have loadfile.lua script which has something like this: -- loadfile.lua --local func = loadfile('loadedfile.lua') local f = assert(io.open('loadedfile.lua')) local str = f:read('*all') f:close() local func = loadstring(str, 'loadedfile.lua') func() foo() print 'Done' If you open both of these files in ZeroBrane Studio and start debugging with loadfile.lua being in the active editor window, you should be able to step through both of them. You can also set a breakpoint on either of the files and it should work. Note that I added "loadedfile.lua" as a parameter for loadstring(), which informs the debug interface as to where to search for the source code. Paul. On Mon, Aug 27, 2012 at 3:37 PM, Milind Gupta <mil...@gm...> wrote: > Hi, > I have a lua program in which I load a lua script as a string > (loadstring) and then execute it. Is it possible to debug this script in > wxLua.exe? How would I add a breakpoint in there? > > Thanks, > Milind > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > wxlua-users mailing list > wxl...@li... > https://lists.sourceforge.net/lists/listinfo/wxlua-users > |