Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Koneki » Re: ldt under ubuntu 12.04 64bit not running
Re: ldt under ubuntu 12.04 64bit not running [message #1416460] Mon, 21 May 2012 10:18 Go to next message
Eclipse UserFriend
Volker Scheffold wrote on Mon, 21 May 2012 12:15
> Hi 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 #1416461 is a reply to message #1416460] Mon, 21 May 2012 10:26 Go to previous messageGo to next message
Eclipse UserFriend
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 #1416462 is a reply to message #1416461] Mon, 21 May 2012 11:18 Go to previous messageGo to next message
Volker Scheffold is currently offline Volker ScheffoldFriend
Messages: 8
Registered: May 2012
Junior Member
Hi Benjamin,

I have it now running.

I appended my lua application to the commandline already.

But the reason why I thougt it is the other way round was that when I try to start the debug configuration from eclipse I run into a timeout.

But that is no problem, the only thing I have to do is to start

lua -e "require('debugger')();" MyApp.lua

fast enough from the commandline, after I started the debug configuration.

Thank you very much for your help :)

Volker
Re: ldt under ubuntu 12.04 64bit not running [message #1416463 is a reply to message #1416462] Mon, 21 May 2012 12:14 Go to previous messageGo to next message
Eclipse UserFriend
Volker Scheffold wrote on Mon, 21 May 2012 13:18
> ... is to start [...] fast enough from the commandline, after I started the debug configuration.


You can also increase the default timeout in the debug config settings :)
Re: ldt under ubuntu 12.04 64bit not running [message #1416464 is a reply to message #1416463] Mon, 21 May 2012 14:03 Go to previous message
Volker Scheffold is currently offline Volker ScheffoldFriend
Messages: 8
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.
Previous Topic:ldt under ubuntu 12.04 64bit not running
Next Topic:Debugging for Corona SDK
Goto Forum:
  


Current Time: Thu Sep 20 08:22:01 GMT 2018

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

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

Back to the top