Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 379965

Summary: [debugger] Making debugger.lua work regardless if remote debugger is active
Product: [Tools] LDT Reporter: uiy uiy <uiy12345>
Component: LuaDevelopmentToolsAssignee: Project Inbox <ldt-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: contact, jdesgats, sbernard
Version: unspecified   
Target Milestone: 1.0 M1   
Hardware: PC   
OS: Windows 7   
URL: http://www.eclipse.org/forums/index.php/t/352856/
Whiteboard:

Description uiy uiy CLA 2012-05-18 08:38:45 EDT
By modifying debugger.lua we can allow the source to run if remote debugger is active or not(if not it will simply run as if it we did not include it).



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 log("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)
Comment 1 uiy uiy CLA 2012-05-18 09:14:14 EDT
the log line should actually be

if not packet then log("DEBUGGER", "WARNING", "No remote debugger found! Bypassing...") return end
Comment 2 Simon Bernard CLA 2013-02-27 05:21:20 EST
should be fixed since commit : c9e2fafc4538541ec5c7d3dc5acfe1412e8c725c
Comment 3 Simon Bernard CLA 2013-03-04 04:48:56 EST
Tested on windows