| 49 | } |
| 50 | |
| 51 | KJob* MIDebugLauncher::start(const QString& launchMode, KDevelop::ILaunchConfiguration* cfg) |
| 52 | { |
| 53 | Q_ASSERT(cfg); |
| 54 | if (launchMode != m_supportedModes.constFirst()) { |
| 55 | qCWarning(DEBUGGERCOMMON) << "unknown launch mode" << launchMode << "for config" << cfg->name(); |
| 56 | return nullptr; |
| 57 | } |
| 58 | qCDebug(DEBUGGERCOMMON) << "MIDebugLauncher: starting debugging"; |
| 59 | |
| 60 | static const auto replaceSessionQuestionText = i18n( |
| 61 | "A program is already being debugged. Do you want to abort the " |
| 62 | "currently running debug session and continue with the launch?"); |
| 63 | if (!KDevelop::ICore::self()->debugController()->canAddSession(replaceSessionQuestionText)) { |
| 64 | return nullptr; |
| 65 | } |
| 66 | |
| 67 | auto* const debugJob = new MIDebugJob(m_plugin, cfg, m_execute); |
| 68 | return makeJobWithDependency(debugJob, *m_execute, cfg); |
| 69 | } |
nothing calls this directly
no test coverage detected