| 56 | } |
| 57 | |
| 58 | std::string CtrlrLuaDebugger::dbgRead(std::string prompt) |
| 59 | { |
| 60 | if (pendingBreakpoints.size() > 0) |
| 61 | { |
| 62 | for (int i=0; i<pendingBreakpoints.size(); i++) |
| 63 | { |
| 64 | PendingBreakpoint pb = pendingBreakpoints.removeAndReturn (i); |
| 65 | |
| 66 | if (pendingBreakpoints.size() == 0) |
| 67 | { |
| 68 | commandQueue.add ("run"); |
| 69 | } |
| 70 | |
| 71 | if (pb.shouldBeSet) |
| 72 | { |
| 73 | return (_STR("setb " + _STR(pb.line) + " " + pb.fileName).toStdString()); |
| 74 | } |
| 75 | else |
| 76 | { |
| 77 | return (_STR("delb " + _STR(pb.line) + " " + pb.fileName).toStdString()); |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | if (commandQueue.size() > 0) |
| 83 | { |
| 84 | return (commandQueue.removeAndReturn (commandQueue.size() - 1).toStdString()); |
| 85 | } |
| 86 | |
| 87 | owner.getOwner().getWindowManager().show (CtrlrPanelWindowManager::LuaMethodEditor); |
| 88 | |
| 89 | CtrlrLuaMethodEditor *ui = dynamic_cast<CtrlrLuaMethodEditor *>(owner.getOwner().getWindowManager().getContent(CtrlrPanelWindowManager::LuaMethodEditor)); |
| 90 | if (ui) |
| 91 | { |
| 92 | if (ui->waitForCommand()) |
| 93 | { |
| 94 | commandQueue.add ("trace"); |
| 95 | commandQueue.add ("vars"); |
| 96 | commandQueue.add (ui->getCurrentDebuggerCommand (true).toStdString()); |
| 97 | return (commandQueue.removeAndReturn (commandQueue.size() - 1).toStdString()); |
| 98 | } |
| 99 | else |
| 100 | { |
| 101 | _WRN("CtrlrLuaDebugger::dbgRead debugger UI didn't return any commands, continuing"); |
| 102 | return ("run"); |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | _WRN("CtrlrLuaDebugger::dbgRead debugger window is invalid, continuing"); |
| 107 | return ("run"); |
| 108 | } |
| 109 | |
| 110 | std::string CtrlrLuaDebugger::dbgRead() |
| 111 | { |
nothing calls this directly
no test coverage detected