MCPcopy Create free account
hub / github.com/Vector35/debugger / performLaunch

Method performLaunch

ui/controlswidget.cpp:135–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133
134
135void 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
161void DebugControlsWidget::performAttachPID()

Callers

nothing calls this directly

Calls 3

IsFirstLaunchMethod · 0.45
GetExecutablePathMethod · 0.45
LaunchMethod · 0.45

Tested by

no test coverage detected