| ldt under ubuntu 12.04 64bit not running [message #874616] |
Mon, 21 May 2012 05:00  |
Volker Scheffold Messages: 4 Registered: May 2012 |
Junior Member |
|
|
Hi,
after I installed ldt and tried to run it with:
lua -e "require('debugger')();"
I run into the following problems:
1.) lua: ./debugger.lua:155: Unable to determine the working directory.
After I fixed this, as I add the path hard into the program. I got the next error.
2.) lua: ./debugger.lua:1543: Cannot connect to 127.0.0.1:10000 : connection refused
stack traceback:
[C]: in function 'error'
./debugger.lua:1543: in function <./debugger.lua:1528>
(command line):1: in main chunk
[C]: ?
Does anyone has any idea?
|
|
|
|
|
| Re: ldt under ubuntu 12.04 64bit not running [message #874654 is a reply to message #874652] |
Mon, 21 May 2012 06:18   |
|
Volker Scheffold wrote on Mon, 21 May 2012 12:15Hi Benjamin,
But, am I right, I have first to start the debugger with lua -e "require('debugger')();" from the commandline, then I can use it in eclipse?
Nope it is the other way around!
You first have to launch the debug config in Eclipse, it opens a debugging server and the script you later launch from the command line then connects to it!
If you feel it needs clarification in the documentation on the Wiki, feel free to update accordingly...
|
|
|
| Re: ldt under ubuntu 12.04 64bit not running [message #874661 is a reply to message #874654] |
Mon, 21 May 2012 06:26   |
|
One more thing, you should make sure to actually append the name of the script you want to debug, on your commandline ; for example:
lua -e "require('debugger')();" MyApp.lua
According to your previous messages, I am not sure you did that, and this might explain a few things 
Cheers!
|
|
|
|
|
| Re: ldt under ubuntu 12.04 64bit not running [message #874766 is a reply to message #874714] |
Mon, 21 May 2012 10:03  |
Volker Scheffold Messages: 4 Registered: May 2012 |
Junior Member |
|
|
There is more than enough time to start lua -e "require('debugger')();" MyApp.lua.
But I waited every time for something like a success message after I started the debug config.
In the meantime I think I know why os.getenv("PWD") is not working. I think the reason is that when the command gets started from the program there is no $PWD variable in that context.
I changed now the line
base_dir = os.getenv("PWD")
to:
local file_name = debug.getinfo(1).short_src
local p = io.popen("dirname $(readlink -f " .. file_name .. ")")
if p then
base_dir = p:read("*l")
p:close()
end
which worked for me.
|
|
|
Powered by
FUDForum. Page generated in 0.01978 seconds