| 133 | |
| 134 | |
| 135 | void DebugControlsWidget::performLaunch() |
| 136 | { |
| 137 | if (m_controller->IsFirstLaunch() && Settings::Instance()->Get<bool>("debugger.confirmFirstLaunch")) |
| 138 | { |
| 139 | auto prompt = QString("You are about to launch \n\n%1\n\non your machine. " |
| 140 | "This may harm your machine. Are you sure to continue?").arg(QString::fromStdString(m_controller->GetExecutablePath())); |
| 141 | if (QMessageBox::question(this, "Launch Target", prompt) != QMessageBox::Yes) |
| 142 | return; |
| 143 | } |
| 144 | |
| 145 | QString text = QString( |
| 146 | "The debugger is %1 the target and preparing the debugger binary view. \n" |
| 147 | "This might take a while.").arg("launching"); |
| 148 | ProgressTask* task = |
| 149 | new ProgressTask(this, "Launching", text, "", [=](std::function<bool(size_t, size_t)> progress) { |
| 150 | m_controller->Launch(); |
| 151 | |
| 152 | // For now, this cant be canceled, as the Debugger model wasn't |
| 153 | // designed with that in mind. This function below can return false if canceling is enabled |
| 154 | progress(1, 1); |
| 155 | return; |
| 156 | }); |
| 157 | task->wait(); |
| 158 | } |
| 159 | |
| 160 | |
| 161 | void DebugControlsWidget::performAttachPID() |
nothing calls this directly
no test coverage detected