| Summary: | [debugger] Making debugger.lua work regardless if remote debugger is active | ||
|---|---|---|---|
| Product: | [Tools] LDT | Reporter: | uiy uiy <uiy12345> |
| Component: | LuaDevelopmentTools | Assignee: | 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: | |||
the log line should actually be
if not packet then log("DEBUGGER", "WARNING", "No remote debugger found! Bypassing...") return end
should be fixed since commit : c9e2fafc4538541ec5c7d3dc5acfe1412e8c725c Tested on windows |
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)