Streamlining LDT [message #873502] |
Fri, 18 May 2012 11:34 |
uiy uiy Messages: 56 Registered: May 2012 |
Member |
|
|
Is there any way to fix these problems:
1. Combine the debugging. I have to select the debug configuration to run. Clicking on the debug does not work(gives an error). I have to click the external tools configuration to run(and match it up with what I want to do). Would be nice to have a key like 'F5' start debugging and 'F5' start non-debugging. (then they could switch over to step control afterwards or change step. I'm used to F9 and F10)
2. I have to close the source file that was opened durring debugging. It is a read only copy of what is already opened. For example, if I debug "Mytest.lua" then I get another window like "D:/workspace/Mytest.lua".
3. Fix debugger.lua so that it skips over itself if the remote debugger is not found instead of throwing a warning. This will allow me to not have to have to external tool configurations.
4. Possibly show the global variables, but local to the file, as local variables in the inspector(that way I don't have to go hunt them).
5. Possibly more options in the settings to configure various properties.
6. Do not show(or ability to turn off) escaped character in inspector. Just seems excessive to see things like \\"C:\\\\program files\\\\\" (when the string is simply "C:\\program files\\"
I'm not sure how much of this stuff is due to eclipse as I'm new to it.
[Updated on: Fri, 18 May 2012 12:08] Report message to a moderator
|
|
|
Re: Streamlining LDT [message #873519 is a reply to message #873502] |
Fri, 18 May 2012 12:24 |
uiy uiy Messages: 56 Registered: May 2012 |
Member |
|
|
The solution to 3 is to modify debugger.lua's debugger_loop(lines marked by ****):
local function debugger_loop(self, async_packet)
blockingtcp.settimeout(self.skt, nil) -- set socket blocking
-- in async mode, the debugger does not wait for another command before continuing and does not modify previous_context
local async_mode = async_packet ~= nil
if self.previous_context and not async_mode then
self.state = "break"
previous_context_response(self)
end
self.stack = ContextManager() -- will be used to mutualize context allocation for each loop
while true do
-- reads packet
--local packet = async_packet or assert(read_packet(self.skt))
*** local packet = async_packet or read_packet(self.skt)
*** if not packet then print("No remote debugger found. Bypassing...") return end
async_packet = nil
log("DEBUGGER", "DEBUG", packet)
local cmd, args, data = cmd_parse(packet)
(this may or may not leave the debugger in an unstable state and effect the main program but does allow it to continue as normal if no remove debugger is connected)
[Updated on: Fri, 18 May 2012 12:25] Report message to a moderator
|
|
|
Re: Streamlining LDT [message #873522 is a reply to message #873519] |
Fri, 18 May 2012 12:30 |
|
Your solution to 3/ sounds like a great improvement indeed. Again, could you please open a bug with the proposed fix?
FWIW it would probably be better to use log(...) instead of print(...)
Thanks so much for your efforts in providing feedback and improvements! This is much appreciated!
My blog: http://blog.benjamin-cabe.com
|
|
|
Re: Streamlining LDT [message #873548 is a reply to message #873502] |
Fri, 18 May 2012 14:03 |
Julien Desgats Messages: 12 Registered: August 2011 |
Junior Member |
|
|
Sorry for textual links: I cant put links on messages yet
uiy uiy wrote on Fri, 18 May 2012 07:34
1. Combine the debugging. I have to select the debug configuration to run. Clicking on the debug does not work(gives an error). I have to click the external tools configuration to run(and match it up with what I want to do). Would be nice to have a key like 'F5' start debugging and 'F5' start non-debugging. (then they could switch over to step control afterwards or change step. I'm used to F9 and F10)
I don't use external tools so I can't help you on this one, sorry.
uiy uiy wrote on Fri, 18 May 2012 07:34
2. I have to close the source file that was opened durring debugging. It is a read only copy of what is already opened. For example, if I debug "Mytest.lua" then I get another window like "D:/workspace/Mytest.lua".
This is due to path mapping that failed somehow. The default option (local resolution) requires that the files are phisically the same. (see wiki.eclipse.org/Koneki/LDT/User_Guide/Concepts/Debugger#Source_Mapping for more informations)
uiy uiy wrote on Fri, 18 May 2012 07:34
3. Fix debugger.lua so that it skips over itself if the remote debugger is not found instead of throwing a warning. This will allow me to not have to have to external tool configurations.
Yes it could be a good improvement. Your fix does the job but you better break the loop instead of returning directly (the code after the loop does some cleanup, allowing some objects to be collected). An even better improvement could be to remove debug hook to remove debugger performance overhead.
uiy uiy wrote on Fri, 18 May 2012 07:34
4. Possibly show the global variables, but local to the file, as local variables in the inspector(that way I don't have to go hunt them).
If I understand correctly, you want to be able to see which of your local variables leaked to global namespace because of a forgotten "local"? I think this job is more for static analysis tools than debuggers (you may be interested by this little script: github.com/hjelmeland/globals).
uiy uiy wrote on Fri, 18 May 2012 07:34
5. Possibly more options in the settings to configure various properties.
Which properties would you like to see?
uiy uiy wrote on Fri, 18 May 2012 07:34
6. Do not show(or ability to turn off) escaped character in inspector. Just seems excessive to see things like \\"C:\\\\program files\\\\\" (when the string is simply "C:\\program files\\"
This notation is intended mimic Lua notation for strings to show that the variable is a string. Also because when you edit then you type full Lua expressions (e.g. { answer = 42 } is evaluated as table and not as string).
But indeed, the backslashes are doubled and shouldn't be in edit mode, it is a bug (I just opened a new bug on tracker). Thanks for report.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05730 seconds