debuggerrunner.cpp 19.1 KB
Newer Older
hjk's avatar
hjk committed
1
/****************************************************************************
con's avatar
con committed
2
**
3
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
hjk's avatar
hjk committed
4
** Contact: http://www.qt-project.org/legal
con's avatar
con committed
5
**
hjk's avatar
hjk committed
6
** This file is part of Qt Creator.
con's avatar
con committed
7
**
hjk's avatar
hjk committed
8
9
10
11
12
13
14
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia.  For licensing terms and
** conditions see http://qt.digia.com/licensing.  For further information
** use the contact form at http://qt.digia.com/contact-us.
15
**
16
** GNU Lesser General Public License Usage
hjk's avatar
hjk committed
17
18
19
20
21
22
23
24
25
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file.  Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights.  These rights are described in the Digia Qt LGPL Exception
con's avatar
con committed
26
27
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
hjk's avatar
hjk committed
28
****************************************************************************/
hjk's avatar
hjk committed
29

con's avatar
con committed
30
#include "debuggerrunner.h"
31
#include "debuggerruncontrolfactory.h"
con's avatar
con committed
32

33
#include "debuggeractions.h"
34
#include "debuggercore.h"
35
36
#include "debuggerengine.h"
#include "debuggerkitinformation.h"
37
#include "debuggerplugin.h"
38
#include "debuggerrunconfigurationaspect.h"
Friedemann Kleint's avatar
Friedemann Kleint committed
39
#include "debuggerstartparameters.h"
40
#include "debuggerstringutils.h"
41
#include "debuggertooltipmanager.h"
42
#include "breakhandler.h"
43

Friedemann Kleint's avatar
Friedemann Kleint committed
44
45
#ifdef Q_OS_WIN
#  include "peutils.h"
46
#  include <utils/winutils.h>
Friedemann Kleint's avatar
Friedemann Kleint committed
47
48
#endif

49
#include <projectexplorer/localapplicationrunconfiguration.h> // For LocalApplication*
50
#include <projectexplorer/environmentaspect.h> // For the environment
hjk's avatar
hjk committed
51
#include <projectexplorer/buildconfiguration.h>
con's avatar
con committed
52
#include <projectexplorer/project.h>
hjk's avatar
hjk committed
53
#include <projectexplorer/projectexplorer.h>
Tobias Hunger's avatar
Tobias Hunger committed
54
#include <projectexplorer/target.h>
55
#include <projectexplorer/taskhub.h>
con's avatar
con committed
56

hjk's avatar
hjk committed
57
#include <utils/qtcassert.h>
58
#include <utils/qtcprocess.h>
59
60
#include <utils/portlist.h>
#include <utils/tcpportsgatherer.h>
61
#include <coreplugin/icore.h>
hjk's avatar
hjk committed
62

63
#include <QErrorMessage>
con's avatar
con committed
64

65
using namespace Debugger::Internal;
hjk's avatar
hjk committed
66
67
using namespace ProjectExplorer;
using namespace Utils;
68

69
70
enum { debug = 0 };

71
namespace Debugger {
72
namespace Internal {
73

74
75
DebuggerEngine *createCdbEngine(const DebuggerStartParameters &sp, QString *error);
DebuggerEngine *createGdbEngine(const DebuggerStartParameters &sp);
hjk's avatar
hjk committed
76
77
DebuggerEngine *createScriptEngine(const DebuggerStartParameters &sp);
DebuggerEngine *createPdbEngine(const DebuggerStartParameters &sp);
78
79
DebuggerEngine *createQmlEngine(const DebuggerStartParameters &sp);
DebuggerEngine *createQmlCppEngine(const DebuggerStartParameters &sp, QString *error);
80
DebuggerEngine *createLldbLibEngine(const DebuggerStartParameters &sp);
hjk's avatar
hjk committed
81
DebuggerEngine *createLldbEngine(const DebuggerStartParameters &sp);
82

83
84
85
86
87
88
static const char *engineTypeName(DebuggerEngineType et)
{
    switch (et) {
    case Debugger::NoEngineType:
        break;
    case Debugger::GdbEngineType:
89
        return "Gdb engine";
90
91
92
93
94
    case Debugger::ScriptEngineType:
        return "Script engine";
    case Debugger::CdbEngineType:
        return "Cdb engine";
    case Debugger::PdbEngineType:
95
        return "Pdb engine";
96
97
98
99
    case Debugger::QmlEngineType:
        return "QML engine";
    case Debugger::QmlCppEngineType:
        return "QML C++ engine";
100
101
    case Debugger::LldbLibEngineType:
        return "LLDB binary engine";
102
    case Debugger::LldbEngineType:
103
        return "LLDB command line engine";
104
105
106
107
108
109
    case Debugger::AllEngineTypes:
        break;
    }
    return "No engine";
}

110
111
////////////////////////////////////////////////////////////////////////
//
hjk's avatar
hjk committed
112
// DebuggerRunControlPrivate
113
114
115
//
////////////////////////////////////////////////////////////////////////

hjk's avatar
hjk committed
116
117
118
class DebuggerRunControlPrivate
{
public:
119
120
    explicit DebuggerRunControlPrivate(DebuggerRunControl *parent,
                                       RunConfiguration *runConfiguration);
121

hjk's avatar
hjk committed
122
123
public:
    DebuggerRunControl *q;
124
    DebuggerEngine *m_engine;
125
    const QPointer<RunConfiguration> m_myRunConfiguration;
126
127
128
    bool m_running;
};

hjk's avatar
hjk committed
129
DebuggerRunControlPrivate::DebuggerRunControlPrivate(DebuggerRunControl *parent,
130
                                                     RunConfiguration *runConfiguration)
hjk's avatar
hjk committed
131
132
    : q(parent)
    , m_engine(0)
133
    , m_myRunConfiguration(runConfiguration)
134
    , m_running(false)
135
136
{
}
137

hjk's avatar
hjk committed
138
139
} // namespace Internal

hjk's avatar
hjk committed
140
DebuggerRunControl::DebuggerRunControl(RunConfiguration *runConfiguration,
hjk's avatar
hjk committed
141
                                       const DebuggerStartParameters &sp)
hjk's avatar
hjk committed
142
    : RunControl(runConfiguration, DebugRunMode),
143
      d(new DebuggerRunControlPrivate(this, runConfiguration))
144
{
hjk's avatar
hjk committed
145
    connect(this, SIGNAL(finished()), SLOT(handleFinished()));
146
147
148
    // Create the engine. Could arguably be moved to the factory, but
    // we still have a derived S60DebugControl. Should rarely fail, though.
    QString errorMessage;
149
    d->m_engine = DebuggerRunControlFactory::createEngine(sp.masterEngineType, sp, &errorMessage);
hjk's avatar
hjk committed
150

151
152
153
    if (d->m_engine) {
        DebuggerToolTipManager::instance()->registerEngine(d->m_engine);
    } else {
154
        debuggingFinished();
hjk's avatar
hjk committed
155
        Core::ICore::showWarningWithOptions(DebuggerRunControl::tr("Debugger"), errorMessage);
156
    }
157
158
}

hjk's avatar
hjk committed
159
160
161
162
163
164
165
166
DebuggerRunControl::~DebuggerRunControl()
{
    disconnect();
    if (DebuggerEngine *engine = d->m_engine) {
        d->m_engine = 0;
        engine->disconnect();
        delete engine;
    }
hjk's avatar
hjk committed
167
    delete d;
hjk's avatar
hjk committed
168
169
170
171
172
173
174
175
}

const DebuggerStartParameters &DebuggerRunControl::startParameters() const
{
    QTC_ASSERT(d->m_engine, return *(new DebuggerStartParameters()));
    return d->m_engine->startParameters();
}

176
QString DebuggerRunControl::displayName() const
177
{
178
179
    QTC_ASSERT(d->m_engine, return QString());
    return d->m_engine->startParameters().displayName;
180
181
}

182
183
QIcon DebuggerRunControl::icon() const
{
184
    return QIcon(QLatin1String(ProjectExplorer::Constants::ICON_DEBUG_SMALL));
185
186
}

hjk's avatar
hjk committed
187
void DebuggerRunControl::setCustomEnvironment(Environment env)
188
{
189
    QTC_ASSERT(d->m_engine, return);
190
    d->m_engine->startParameters().environment = env;
191
192
}

193
void DebuggerRunControl::start()
194
{
195
    QTC_ASSERT(d->m_engine, return);
196
197
198
    // User canceled input dialog asking for executable when working on library project.
    if (d->m_engine->startParameters().startMode == StartInternal
        && d->m_engine->startParameters().executable.isEmpty()) {
hjk's avatar
hjk committed
199
        appendMessage(tr("No executable specified.\n"), ErrorMessageFormat);
200
201
202
203
204
        emit started();
        emit finished();
        return;
    }

205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
    if (d->m_engine->startParameters().startMode == StartInternal) {
        foreach (const BreakpointModelId &id, debuggerCore()->breakHandler()->allBreakpointIds()) {
            if (d->m_engine->breakHandler()->breakpointData(id).enabled
                    && !d->m_engine->acceptsBreakpoint(id)) {

                QString warningMessage =
                        DebuggerPlugin::tr("Some breakpoints cannot be handled by the debugger "
                                           "languages currently active, and will be ignored.");

                debuggerCore()->showMessage(warningMessage, LogWarning);

                QErrorMessage *msgBox = new QErrorMessage(debuggerCore()->mainWindow());
                msgBox->setAttribute(Qt::WA_DeleteOnClose);
                msgBox->showMessage(warningMessage);
                break;
            }
221
222
223
        }
    }

224
    debuggerCore()->runControlStarted(d->m_engine);
225

226
227
    // We might get a synchronous startFailed() notification on Windows,
    // when launching the process fails. Emit a proper finished() sequence.
228
    emit started();
229
230
    d->m_running = true;

231
    d->m_engine->startDebugger(this);
232

233
    if (d->m_running)
hjk's avatar
hjk committed
234
        appendMessage(tr("Debugging starts\n"), NormalMessageFormat);
235
236
}

237
void DebuggerRunControl::startFailed()
238
{
hjk's avatar
hjk committed
239
    appendMessage(tr("Debugging has failed\n"), NormalMessageFormat);
240
    d->m_running = false;
241
    emit finished();
242
    d->m_engine->handleStartFailed();
243
244
}

245
void DebuggerRunControl::handleFinished()
246
{
hjk's avatar
hjk committed
247
    appendMessage(tr("Debugging has finished\n"), NormalMessageFormat);
248
249
250
    if (d->m_engine)
        d->m_engine->handleFinished();
    debuggerCore()->runControlFinished(d->m_engine);
251
252
}

253
void DebuggerRunControl::showMessage(const QString &msg, int channel)
254
{
255
256
    switch (channel) {
        case AppOutput:
hjk's avatar
hjk committed
257
            appendMessage(msg, StdOutFormatSameLine);
258
259
            break;
        case AppError:
hjk's avatar
hjk committed
260
            appendMessage(msg, StdErrFormatSameLine);
261
262
            break;
        case AppStuff:
hjk's avatar
hjk committed
263
            appendMessage(msg, DebugFormat);
264
265
            break;
    }
266
267
}

268
bool DebuggerRunControl::promptToStop(bool *optionalPrompt) const
269
{
270
    QTC_ASSERT(isRunning(), return true);
271

272
273
274
    if (optionalPrompt && !*optionalPrompt)
        return true;

Jarek Kobus's avatar
Jarek Kobus committed
275
    const QString question = tr("A debugging session is still in progress. "
276
277
278
            "Terminating the session in the current"
            " state can leave the target in an inconsistent state."
            " Would you still like to terminate it?");
279
280
    return showPromptToStopDialog(tr("Close Debugging Session"), question,
                                  QString(), QString(), optionalPrompt);
281
282
283
284
}

RunControl::StopResult DebuggerRunControl::stop()
{
285
286
    QTC_ASSERT(d->m_engine, return StoppedSynchronously);
    d->m_engine->quitDebugger();
287
    return AsynchronousStop;
288
289
}

290
void DebuggerRunControl::debuggingFinished()
291
{
292
    d->m_running = false;
293
    emit finished();
294
295
}

296
bool DebuggerRunControl::isRunning() const
297
{
298
    return d->m_running;
299
300
}

301
DebuggerEngine *DebuggerRunControl::engine()
302
{
303
    QTC_CHECK(d->m_engine);
304
    return d->m_engine;
305
306
}

307
308
309
310
RunConfiguration *DebuggerRunControl::runConfiguration() const
{
    return d->m_myRunConfiguration.data();
}
311

312
313
314
315
316
317
318

////////////////////////////////////////////////////////////////////////
//
// DebuggerRunControlFactory
//
////////////////////////////////////////////////////////////////////////

319
320
DebuggerRunControlFactory::DebuggerRunControlFactory(QObject *parent)
    : IRunControlFactory(parent)
321
322
{}

323
bool DebuggerRunControlFactory::canRun(RunConfiguration *runConfiguration, RunMode mode) const
324
{
325
    return (mode == DebugRunMode || mode == DebugRunModeWithBreakOnMain)
326
327
328
329
330
            && qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration);
}

QString DebuggerRunControlFactory::displayName() const
{
hjk's avatar
hjk committed
331
    return DebuggerPlugin::tr("Debug");
332
333
}

334
static DebuggerStartParameters localStartParameters(RunConfiguration *runConfiguration, QString *errorMessage)
335
336
337
338
339
340
{
    DebuggerStartParameters sp;
    QTC_ASSERT(runConfiguration, return sp);
    LocalApplicationRunConfiguration *rc =
            qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration);
    QTC_ASSERT(rc, return sp);
341
342
    EnvironmentAspect *environment = rc->extraAspect<ProjectExplorer::EnvironmentAspect>();
    QTC_ASSERT(environment, return sp);
343
344
    if (!rc->ensureConfigured(errorMessage))
        return sp;
345

hjk's avatar
hjk committed
346
    Target *target = runConfiguration->target();
Tobias Hunger's avatar
Tobias Hunger committed
347
    Kit *kit = target ? target->kit() : KitManager::instance()->defaultKit();
348
349
    if (!fillParameters(&sp, kit, errorMessage))
        return sp;
350
    sp.environment = environment->environment();
351
    sp.workingDirectory = rc->workingDirectory();
352
353
354

#if defined(Q_OS_WIN)
    // Work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch' ...)
hjk's avatar
hjk committed
355
    sp.workingDirectory = normalizePathName(sp.workingDirectory);
356
357
#endif

358
    sp.executable = rc->executable();
359
360
    if (sp.executable.isEmpty())
        return sp;
361

362
363
364
365
366
    sp.processArgs = rc->commandLineArguments();
    sp.useTerminal = rc->runMode() == LocalApplicationRunConfiguration::Console;
    sp.dumperLibrary = rc->dumperLibrary();
    sp.dumperLibraryLocations = rc->dumperLibraryLocations();

hjk's avatar
hjk committed
367
368
    if (target) {
        if (const Project *project = target->project()) {
369
            sp.projectSourceDirectory = project->projectDirectory();
hjk's avatar
hjk committed
370
            if (const BuildConfiguration *buildConfig = target->activeBuildConfiguration())
371
372
                sp.projectBuildDirectory = buildConfig->buildDirectory();
            sp.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles);
373
374
375
        }
    }

376
    DebuggerRunConfigurationAspect *debugger
377
            = runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
378
    sp.multiProcess = debugger->useMultiProcess();
379

380
    if (debugger->useCppDebugger())
381
382
        sp.languages |= CppLanguage;

383
    if (debugger->useQmlDebugger()) {
384
385
        const ProjectExplorer::IDevice::ConstPtr device =
                DeviceKitInformation::device(runConfiguration->target()->kit());
386
        sp.qmlServerAddress = _("127.0.0.1");
387
388
389
390
391
392
393
394
395
396
397
398
399
        QTC_ASSERT(device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE, return sp);
        TcpPortsGatherer portsGatherer;
        portsGatherer.update(QAbstractSocket::UnknownNetworkLayerProtocol);
        Utils::PortList portList = device->freePorts();
        int freePort = portsGatherer.getNextFreePort(&portList);
        if (freePort == -1) {
            if (errorMessage)
                *errorMessage = DebuggerPlugin::tr("Not enough free ports for QML debugging. "
                                                   "Increase the port range for Desktop device in "
                                                   "Device settings.");
            return sp;
        }
        sp.qmlServerPort = freePort;
400
        sp.languages |= QmlLanguage;
401

402
403
        // Makes sure that all bindings go through the JavaScript engine, so that
        // breakpoints are actually hit!
404
        const QString optimizerKey = _("QML_DISABLE_OPTIMIZER");
hjk's avatar
hjk committed
405
        if (!sp.environment.hasKey(optimizerKey))
406
            sp.environment.set(optimizerKey, _("1"));
407

hjk's avatar
hjk committed
408
        QtcProcess::addArg(&sp.processArgs, QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(sp.qmlServerPort));
409
410
    }

411
412
    sp.startMode = StartInternal;

413
414
415
416
417
418
419
420
421
422
    // FIXME: If it's not yet build this will be empty and not filled
    // when rebuild as the runConfiguration is not stored and therefore
    // cannot be used to retrieve the dumper location.
    //qDebug() << "DUMPER: " << sp.dumperLibrary << sp.dumperLibraryLocations;
    sp.displayName = rc->displayName();

    return sp;
}

RunControl *DebuggerRunControlFactory::create
423
    (RunConfiguration *runConfiguration, RunMode mode, QString *errorMessage)
424
{
425
    QTC_ASSERT(mode == DebugRunMode || mode == DebugRunModeWithBreakOnMain, return 0);
426
    DebuggerStartParameters sp = localStartParameters(runConfiguration, errorMessage);
427
428
    if (sp.startMode == NoStartMode)
        return 0;
429
    if (mode == DebugRunModeWithBreakOnMain)
430
        sp.breakOnMain = true;
hjk's avatar
hjk committed
431

432
    return doCreate(sp, runConfiguration, errorMessage);
433
434
}

435
static bool fixupEngineTypes(DebuggerStartParameters &sp, RunConfiguration *rc, QString *errorMessage)
hjk's avatar
hjk committed
436
437
{
    if (sp.masterEngineType != NoEngineType)
438
        return true;
hjk's avatar
hjk committed
439
440
441

    if (sp.executable.endsWith(_(".js"))) {
        sp.masterEngineType = ScriptEngineType;
442
        return true;
hjk's avatar
hjk committed
443
444
445
446
    }

    if (sp.executable.endsWith(_(".py"))) {
        sp.masterEngineType = PdbEngineType;
447
        return true;
hjk's avatar
hjk committed
448
449
450
    }

    if (rc) {
451
        DebuggerRunConfigurationAspect *aspect
452
                = rc->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
453
        if (const Target *target = rc->target())
454
455
            if (!fillParameters(&sp, target->kit(), errorMessage))
                return false;
456
457
        const bool useCppDebugger = aspect->useCppDebugger();
        const bool useQmlDebugger = aspect->useQmlDebugger();
hjk's avatar
hjk committed
458
459
460
        if (useQmlDebugger) {
            if (useCppDebugger) {
                sp.masterEngineType = QmlCppEngineType;
461
                sp.firstSlaveEngineType = sp.cppEngineType;
hjk's avatar
hjk committed
462
463
464
465
466
                sp.secondSlaveEngineType = QmlCppEngineType;
            } else {
                sp.masterEngineType = QmlEngineType;
            }
        } else {
467
            sp.masterEngineType = sp.cppEngineType;
hjk's avatar
hjk committed
468
        }
469
        return true;
hjk's avatar
hjk committed
470
    }
471
472
    sp.masterEngineType = sp.cppEngineType;
    return true;
hjk's avatar
hjk committed
473
474
475
}

DebuggerRunControl *DebuggerRunControlFactory::doCreate
476
    (const DebuggerStartParameters &sp0, RunConfiguration *rc, QString *errorMessage)
hjk's avatar
hjk committed
477
{
478
479
480
481
482
    TaskHub *th = ProjectExplorerPlugin::instance()->taskHub();
    th->clearTasks(Core::Id(Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO));
    th->clearTasks(Core::Id(Debugger::Constants::TASK_CATEGORY_DEBUGGER_TEST));
    th->clearTasks(Core::Id(Debugger::Constants::TASK_CATEGORY_DEBUGGER_RUNTIME));

hjk's avatar
hjk committed
483
484
485
    DebuggerStartParameters sp = sp0;
    if (!debuggerCore()->boolSetting(AutoEnrichParameters)) {
        const QString sysroot = sp.sysRoot;
486
        if (sp.debugInfoLocation.isEmpty())
hjk's avatar
hjk committed
487
488
489
490
491
492
493
494
495
            sp.debugInfoLocation = sysroot + QLatin1String("/usr/lib/debug");
        if (sp.debugSourceLocation.isEmpty()) {
            QString base = sysroot + QLatin1String("/usr/src/debug/");
            sp.debugSourceLocation.append(base + QLatin1String("qt5base/src/corelib"));
            sp.debugSourceLocation.append(base + QLatin1String("qt5base/src/gui"));
            sp.debugSourceLocation.append(base + QLatin1String("qt5base/src/network"));
            sp.debugSourceLocation.append(base + QLatin1String("qt5base/src/v8"));
            sp.debugSourceLocation.append(base + QLatin1String("qt5declarative/src/qml"));
        }
496
497
    }

498
    if (!fixupEngineTypes(sp, rc, errorMessage))
hjk's avatar
hjk committed
499
500
501
502
503
        return 0;

    return new DebuggerRunControl(rc, sp);
}

504
505
506
507
508
IRunConfigurationAspect *DebuggerRunControlFactory::createRunConfigurationAspect(RunConfiguration *rc)
{
    return new DebuggerRunConfigurationAspect(rc);
}

hjk's avatar
hjk committed
509
510
511
DebuggerRunControl *DebuggerRunControlFactory::createAndScheduleRun
    (const DebuggerStartParameters &sp, RunConfiguration *runConfiguration)
{
512
    QString errorMessage;
513
514
515
    if (runConfiguration && !runConfiguration->ensureConfigured(&errorMessage))
        ProjectExplorer::ProjectExplorerPlugin::showRunErrorMessage(errorMessage);

516
517
518
    DebuggerRunControl *rc = doCreate(sp, runConfiguration, &errorMessage);
    if (!rc) {
        ProjectExplorer::ProjectExplorerPlugin::showRunErrorMessage(errorMessage);
hjk's avatar
hjk committed
519
        return 0;
520
    }
hjk's avatar
hjk committed
521
522
523
524
525
    debuggerCore()->showMessage(sp.startMessage, 0);
    ProjectExplorerPlugin::instance()->startRunControl(rc, DebugRunMode);
    return rc;
}

526
527
DebuggerEngine *DebuggerRunControlFactory::createEngine(DebuggerEngineType et,
    const DebuggerStartParameters &sp, QString *errorMessage)
528
529
530
{
    switch (et) {
    case GdbEngineType:
531
        return createGdbEngine(sp);
532
533
534
    case ScriptEngineType:
        return createScriptEngine(sp);
    case CdbEngineType:
535
        return createCdbEngine(sp, errorMessage);
536
537
538
    case PdbEngineType:
        return createPdbEngine(sp);
    case QmlEngineType:
539
        return createQmlEngine(sp);
540
541
    case LldbEngineType:
        return createLldbEngine(sp);
542
543
    case LldbLibEngineType:
        return createLldbLibEngine(sp);
hjk's avatar
hjk committed
544
545
    case QmlCppEngineType:
        return createQmlCppEngine(sp, errorMessage);
546
547
    default:
        break;
548
    }
hjk's avatar
hjk committed
549
    *errorMessage = DebuggerPlugin::tr("Unable to create a debugger engine of the type '%1'").
550
                    arg(_(engineTypeName(et)));
551
552
553
    return 0;
}

hjk's avatar
hjk committed
554
} // namespace Debugger