How to set remote system for remote debug [message #1226964] |
Fri, 03 January 2014 02:11  |
Eclipse User |
|
|
|
I am a newer for lua, and now i need remote development and remote debug.
in win7, i installed ldt and remote development supoort. i want to debug my helloworld in the remote system redhat 5.4.
in redhat, i just installed lua5.1.4 and luarocks.
ssh connection is ok. i run the helloworld, it can be transfered to the redhat, but launch had some problems.in the console of ldt , the output is "bash: lua: command not found".
when i debugged the helloworld, got the followed error:
exception occurred during launch
reason: Debugger process was unexpectedly terminated
i am not sure what i have done is correct.
please give the steps Written very detailed .
i saw : http://wiki.eclipse.org/Koneki/LDT/Developer_Area/User_Guides/User_Guide_1.0#Remote_session
but still have no idea about remote development and remote debug.
any help is appreciative.
|
|
|
|
|
|
Re: How to set remote system for remote debug [message #1228097 is a reply to message #1228012] |
Mon, 06 January 2014 07:03   |
Eclipse User |
|
|
|
HI,
I hope who can explain the meaning of these items:
LD_LIBRARY_PATH
Lua Command lua
Lua CPath
Lua Path
Output Directory /tmp
Also, I installed installed lua5.1.4 and luarocks, I want to debug a file, such as Hello.lua (not main, such as only a fuction), I am in the LDT remote mode, do not add require ("debugger") () in front, on the other side (routers) do not have to install luarocks, and require ("debugger") () can be debugged, is that right?
|
|
|
|
|
|
Re: How to set remote system for remote debug [message #1228750 is a reply to message #1228563] |
Tue, 07 January 2014 19:34   |
Eclipse User |
|
|
|
Thank you, I find the path, and then later set LDT, do not have this problem, but now have a new problem, it seems some people appeared. configure LDT environment, this is really a complex task
And I see my router a few more files, such as debugger.lua, in LDT_Debug dir, indicating the success of the communications
The problem is:
Process "LDT_Debug" takes too long to connect to IDE...
|
|
|
|
Re: How to set remote system for remote debug [message #1228970 is a reply to message #1228897] |
Wed, 08 January 2014 07:54   |
Eclipse User |
|
|
|
HI,Simon Bernard
I think i set right path
I tried it your way,
LDT report:
/usr/bin/lua: controller/admin/system.lua:16: attempt to call a boolean value
stack traceback:
controller/admin/system.lua:16: in main chunk
[C]: ?
I don't what to do.
More info is below:
Router:
1, luasocket version:2.0.2, it's work
2, Lua Path /usr/lib/lua/luci/controller/admin/system.lua(i only set be debug file, because so much files and some name is same)
3, here is some file content of system.lua
...
$Id: system.lua 9570 2012-12-25 02:45:42Z jow $
]]--
module("luci.controller.admin.system", package.seeall)
line 16(In fact there is no content)
function index()
entry({"admin", "system"}, alias("admin", "system", "system"), _("System"), 30).index = true
...
PC:
1, luasocket version:3.0, it's work
2, .lua path /lucsrc/luci/controller/admin/system.lua
3, here is some file content of be debug system.lua
$Id: system.lua 9570 2012-12-25 02:45:42Z jow $
]]--
require('socket')
require('debugger')();--i add right environment variable.
module("luci.controller.admin.system", package.seeall)
line 18(In fact there is no content)
function index()
entry({"admin", "system"}, alias("admin", "system", "system"), _("System"), 30).index = true
...
|
|
|
|
Re: How to set remote system for remote debug [message #1229287 is a reply to message #1229224] |
Thu, 09 January 2014 00:18  |
Eclipse User |
|
|
|
ROUTER:
root@admin/# cat lua test.lua
require('socket')
function test()
print"hello limeng"
local i = 100
print (i)
end
test()
root@admin/# lua test.lua
hello limeng
100
PC:use 'RUN' at LDT
err:
/usr/bin/lua: test.lua:1: module 'socket' not found:
no field package.preload['socket']
no file '/usr/bin/socket'
no file '/tmp/openwrt_system_193.168.1.1/socket.lua'
no file '/tmp/openwrt_system_193.168.1.1/socket/init.lua'
no file '/lib/socket.so'
no file '/lib/lua/socket.so'
no file '/usr/lib/socket.so'
no file '/usr/lib/lua/socket.so'
no file '/usr/lib/lua/mime/socket.so'
no file '/usr/lib/pppd/2.4.5/socket.so'
stack traceback:
[C]: in function 'require'
test.lua:1: in main chunk
[C]: ?
I find some *.so have Extension name,
Such as 'socket.so.2.0.2'
|
|
|
Powered by
FUDForum. Page generated in 0.04923 seconds