MCPcopy Create free account
hub / github.com/KDE/kdevelop / startDebugging

Method startDebugging

plugins/debuggercommon/midebugsession.cpp:237–269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237bool MIDebugSession::startDebugging(ILaunchConfiguration* cfg, IExecutePlugin* iexec)
238{
239 Q_ASSERT(cfg);
240 Q_ASSERT(iexec);
241
242 // ExecutePlugin prints a descriptive warning when it detects an error. Do not show
243 // errorString in the UI, because this overload is called only from unit tests.
244 QString errorString;
245
246 auto executablePath = iexec->executable(cfg, errorString).toLocalFile();
247 if (!errorString.isEmpty()) {
248 return false;
249 }
250 if (!QFileInfo{executablePath}.isExecutable()) {
251 qCWarning(DEBUGGERCOMMON) << executablePath << "is not an executable";
252 return false;
253 }
254
255 auto arguments = iexec->arguments(cfg, errorString);
256 if (!errorString.isEmpty()) {
257 return false;
258 }
259
260 QStringList terminal;
261 if (iexec->useTerminal(cfg)) {
262 terminal = iexec->terminal(cfg, errorString);
263 if (!errorString.isEmpty()) {
264 return false;
265 }
266 }
267
268 return startDebugging({iexec, cfg, std::move(executablePath), std::move(arguments), std::move(terminal)});
269}
270
271bool MIDebugSession::startDebugging(const InferiorStartupInfo& startupInfo)
272{

Callers 15

testQCharMethod · 0.80
testQStringMethod · 0.80
testQByteArrayMethod · 0.80
testQListContainerMethod · 0.80
testQListPODMethod · 0.80
testQMapIntMethod · 0.80
testQMapStringMethod · 0.80
testQMapStringBoolMethod · 0.80
testQHashIntMethod · 0.80
testQHashStringMethod · 0.80
testQSetIntMethod · 0.80
testQSetStringMethod · 0.80

Calls 15

toLocalFileMethod · 0.80
getSlaveMethod · 0.80
lastErrorMethod · 0.80
uiControllerMethod · 0.80
emptyMethod · 0.80
readEntryMethod · 0.80
executableMethod · 0.45
isEmptyMethod · 0.45
argumentsMethod · 0.45
useTerminalMethod · 0.45
terminalMethod · 0.45
resetMethod · 0.45

Tested by 15

testQCharMethod · 0.64
testQStringMethod · 0.64
testQByteArrayMethod · 0.64
testQListContainerMethod · 0.64
testQListPODMethod · 0.64
testQMapIntMethod · 0.64
testQMapStringMethod · 0.64
testQMapStringBoolMethod · 0.64
testQHashIntMethod · 0.64
testQHashStringMethod · 0.64
testQSetIntMethod · 0.64
testQSetStringMethod · 0.64