Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » Debugging issue with Lua standalone interpreter with LDT1.0(DEBUGGER ERROR Command context_get caused: (998) ....osgi\bundles\173\1\.cp\script\external\debugger.lua:187: attempt to call field 'encode' (a nil value))
Debugging issue with Lua standalone interpreter with LDT1.0 [message #1144917] Sat, 19 October 2013 06:00
Nitesh R is currently offline Nitesh RFriend
Messages: 4
Registered: October 2013
Junior Member
Hi,

I have been trying to use LDT1.0 for my lua script debugging, but facing issue with debug window. In debug window, when I step into my script, it shows following error on console.

DEBUGGER ERROR Command context_get caused: (998) ....osgi\bundles\173\1\.cp\script\external\debugger.lua:187: attempt to call field 'encode' (a nil value)
stack traceback:
....osgi\bundles\173\1\.cp\script\external\debugger.lua:187: in function 'b64'
....osgi\bundles\173\1\.cp\script\external\debugger.lua:1439: in function <....osgi\bundles\173\1\.cp\script\external\debugger.lua:1423>
(tail call): ?
....osgi\bundles\173\1\.cp\script\external\debugger.lua:636: in function <....osgi\bundles\173\1\.cp\script\external\debugger.lua:625>
(tail call): ?
[C]: in function 'xpcall'
....osgi\bundles\173\1\.cp\script\external\debugger.lua:2548: in function <....osgi\bundles\173\1\.cp\script\external\debugger.lua:2518>
[C]: in function 'pcall'
....osgi\bundles\173\1\.cp\script\external\debugger.lua:2603: in function 'line_hook'
....osgi\bundles\173\1\.cp\script\external\debugger.lua:2627: in function <....osgi\bundles\173\1\.cp\script\external\debugger.lua:2615>



Background:
I created "My custom lua interpreter" in following manner:
1. I downloaded lua 5.1.5 source code(.c/.h) from lua.org/ftp/lua-5.1.5.tar.gz to C:\Source (= SRC)
2. I added some c functions (which will be accessed from my script) in new files my_libc.c. Added necessary changes in lua source files [SRC]to include these c libraries. Then, copied these files to SRC folder
3. Then, downloaded luasocket 2.0.2 source code from
files.luaforge.net/releases/luasocket/luasocket/luasocket-2.0.2
4. Copied all .c/.h from luasocket source folder ( excluding usocket.c, unix.c) (including mime.c) to SRC folder
5. Then added
{"socket.core",luaopen_socket_core},
{"mime.core",luaopen_mime_core},
in lua init.c file in "static const luaL_Reg lualibs[]" table
6.Then build this source project in Visual Studio to generate executable ( my_lua.exe)
Please note, I needed one output file, so I built it statically.

7. Then, I added socket.lua, mime.lua , lnt12.lua from original luasocket folder to my SCRIPT folder,

8. Opened LDT1.0, in debug config, I added my_lua.exe as interpreter and started stepping through, I see stepping through going file. That is script is loaded correctly, but not able to see anything in variable window, variables values are not seen because of aforementioned Error.

Can anyone let me know, where is the issue? How can I see variables used in script.

Thanks,
A lua newbee


[Updated on: Sat, 19 October 2013 17:45]

Report message to a moderator

Previous Topic:LDT debugger
Next Topic:LDT with an external library (winapi.dll)
Goto Forum:
  


Current Time: Fri May 03 22:01:23 GMT 2024

Powered by FUDForum. Page generated in 0.02427 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top