debuggeractions.cpp 20.4 KB
Newer Older
hjk's avatar
hjk committed
1 2 3 4
/**************************************************************************
**
** This file is part of Qt Creator
**
hjk's avatar
hjk committed
5
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hjk's avatar
hjk committed
6
**
7
** Contact: Nokia Corporation (qt-info@nokia.com)
hjk's avatar
hjk committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
**
** Commercial Usage
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
**
** 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.
**
** If you are unsure which license is appropriate for your use, please
hjk's avatar
hjk committed
26
** contact the sales department at http://qt.nokia.com/contact.
hjk's avatar
hjk committed
27 28 29 30
**
**************************************************************************/

#include "debuggeractions.h"
31 32 33
#ifdef Q_OS_WIN
#include "registerpostmortemaction.h"
#endif
hjk's avatar
hjk committed
34

35 36
#include <projectexplorer/toolchain.h>

37
#include <utils/savedaction.h>
38 39 40
#include <utils/qtcassert.h>
#include <utils/pathchooser.h>

41
#include <QtCore/QDebug>
42
#include <QtCore/QVariant>
43
#include <QtCore/QSettings>
44

hjk's avatar
hjk committed
45
#include <QtGui/QAction>
46 47 48 49
#include <QtGui/QAbstractButton>
#include <QtGui/QRadioButton>
#include <QtGui/QCheckBox>
#include <QtGui/QLineEdit>
hjk's avatar
hjk committed
50

51
using namespace Utils;
hjk's avatar
hjk committed
52

53 54 55 56
static const char debugModeSettingsGroupC[] = "DebugMode";
static const char gdbBinariesSettingsGroupC[] = "GdbBinaries";
static const char debugModeGdbBinaryKeyC[] = "GdbBinary";

57 58
namespace Debugger {
namespace Internal {
59

hjk's avatar
hjk committed
60 61
//////////////////////////////////////////////////////////////////////////
//
hjk's avatar
hjk committed
62
// DebuggerSettings
hjk's avatar
hjk committed
63 64 65
//
//////////////////////////////////////////////////////////////////////////

hjk's avatar
hjk committed
66
DebuggerSettings::DebuggerSettings(QObject *parent)
67
    : QObject(parent)
68 69
{}

hjk's avatar
hjk committed
70
DebuggerSettings::~DebuggerSettings()
hjk's avatar
hjk committed
71
{
72 73
    qDeleteAll(m_items);
}
74

75
void DebuggerSettings::insertItem(int code, SavedAction *item)
hjk's avatar
hjk committed
76
{
77 78 79 80
    QTC_ASSERT(!m_items.contains(code),
        qDebug() << code << item->toString(); return);
    QTC_ASSERT(item->settingsKey().isEmpty() || item->defaultValue().isValid(),
        qDebug() << "NO DEFAULT VALUE FOR " << item->settingsKey());
81 82 83
    m_items[code] = item;
}

hjk's avatar
hjk committed
84
void DebuggerSettings::readSettings(QSettings *settings)
85
{
86
    foreach (SavedAction *item, m_items)
87
        item->readSettings(settings);
88 89
    // Convert gdb binaries from flat settings list (see writeSettings)
    // into map ("binary1=gdb,1,2", "binary2=symbian_gdb,3,4").
90
    m_gdbBinaryToolChainMap.clear();
91 92 93 94 95 96 97 98 99 100 101 102 103 104
    const QChar separator = QLatin1Char(',');
    const QString keyRoot = QLatin1String(gdbBinariesSettingsGroupC) + QLatin1Char('/') +
                            QLatin1String(debugModeGdbBinaryKeyC);
    for (int i = 1; ; i++) {
        const QString value = settings->value(keyRoot + QString::number(i)).toString();
        if (value.isEmpty())
            break;
        // Split apart comma-separated binary and its numerical toolchains.
        QStringList tokens = value.split(separator);
        if (tokens.size() < 2)
            break;
        const QString binary = tokens.front();
        tokens.pop_front();
        foreach(const QString &t, tokens)
105
            m_gdbBinaryToolChainMap.insert(binary, t.toInt());
106 107 108
    }
    // Linux defaults
#ifdef Q_OS_UNIX
109
    if (m_gdbBinaryToolChainMap.isEmpty()) {
110
        const QString gdb = QLatin1String("gdb");
111 112 113
        m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain::GCC);
        m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain::OTHER);
        m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain::UNKNOWN);
114 115
    }
#endif
116 117
}

118
void DebuggerSettings::writeSettings(QSettings *settings) const
119
{
120
    foreach (SavedAction *item, m_items)
121
        item->writeSettings(settings);
122 123 124 125 126
    // Convert gdb binaries map into a flat settings list of
    // ("binary1=gdb,1,2", "binary2=symbian_gdb,3,4"). It needs to be ASCII for installers
    QString lastBinary;
    QStringList settingsList;
    const QChar separator = QLatin1Char(',');
127 128
    const GdbBinaryToolChainMap::const_iterator cend = m_gdbBinaryToolChainMap.constEnd();
    for (GdbBinaryToolChainMap::const_iterator it = m_gdbBinaryToolChainMap.constBegin(); it != cend; ++it) {
129 130 131 132 133 134 135 136 137 138 139 140 141 142
        if (it.key() != lastBinary) {
            lastBinary = it.key(); // Start new entry with first toolchain
            settingsList.push_back(lastBinary);
        }
        settingsList.back().append(separator); // Append toolchain to last binary
        settingsList.back().append(QString::number(it.value()));
    }
    settings->beginGroup(QLatin1String(gdbBinariesSettingsGroupC));
    settings->remove(QString()); // remove all keys in group.
    const int count = settingsList.size();
    const QString keyRoot = QLatin1String(debugModeGdbBinaryKeyC);
    for (int i = 0; i < count; i++)
        settings->setValue(keyRoot + QString::number(i + 1), settingsList.at(i));
    settings->endGroup();
143
}
144

145
SavedAction *DebuggerSettings::item(int code) const
146
{
hjk's avatar
hjk committed
147
    QTC_ASSERT(m_items.value(code, 0), qDebug() << "CODE: " << code; return 0);
148 149 150
    return m_items.value(code, 0);
}

151
QString DebuggerSettings::dump() const
152 153 154
{
    QString out;
    QTextStream ts(&out);
155 156 157
    ts << "Debugger settings: ";
    foreach (SavedAction *item, m_items) {
        QString key = item->settingsKey();
158 159 160 161 162 163 164 165
        if (!key.isEmpty()) {
            const QString current = item->value().toString();
            const QString default_ = item->defaultValue().toString();
            ts << '\n' << key << ": " << current 
               << "  (default: " << default_ << ")";
            if (current != default_)
                ts <<  "  ***";
        }
166
    }
167 168 169
    return out;
}

170
DebuggerSettings *DebuggerSettings::instance()
171
{
hjk's avatar
hjk committed
172
    static DebuggerSettings *instance = 0;
173 174 175
    if (instance)
        return instance;

176
    const QString debugModeGroup = QLatin1String(debugModeSettingsGroupC);
hjk's avatar
hjk committed
177
    instance = new DebuggerSettings;
178

179
    SavedAction *item = 0;
180

hjk's avatar
hjk committed
181 182
    item = new SavedAction(instance);
    instance->insertItem(SettingsDialog, item);
183
    item->setText(tr("Debugger Properties..."));
hjk's avatar
hjk committed
184

185 186 187
    //
    // View
    //
188
    item = new SavedAction(instance);
189
    item->setText(tr("Adjust Column Widths to Contents"));
190
    instance->insertItem(AdjustColumnWidths, item);
191

192
    item = new SavedAction(instance);
193
    item->setText(tr("Always Adjust Column Widths to Contents"));
194
    item->setCheckable(true);
195
    instance->insertItem(AlwaysAdjustColumnWidths, item);
196

197
    item = new SavedAction(instance);
198
    item->setText(tr("Use Alternating Row Colors"));
199 200 201 202 203
    item->setSettingsKey(debugModeGroup, QLatin1String("UseAlternatingRowColours"));
    item->setCheckable(true);
    item->setDefaultValue(false);
    instance->insertItem(UseAlternatingRowColors, item);

204
    item = new SavedAction(instance);
205
    item->setText(tr("Show a Message Box When Receiving a Signal"));
206 207 208 209 210 211 212
    item->setSettingsKey(debugModeGroup, QLatin1String("UseMessageBoxForSignals"));
    item->setCheckable(true);
    item->setDefaultValue(true);
    item->setValue(true);
    instance->insertItem(UseMessageBoxForSignals, item);

    item = new SavedAction(instance);
213
    item->setText(tr("Log Time Stamps"));
214
    item->setSettingsKey(debugModeGroup, QLatin1String("LogTimeStamps"));
215 216 217 218
    item->setCheckable(true);
    item->setDefaultValue(false);
    instance->insertItem(LogTimeStamps, item);

219 220 221 222 223 224 225
    item = new SavedAction(instance);
    item->setText(tr("Verbose Log"));
    item->setSettingsKey(debugModeGroup, QLatin1String("VerboseLog"));
    item->setCheckable(true);
    item->setDefaultValue(false);
    instance->insertItem(VerboseLog, item);

226
    item = new SavedAction(instance);
227
    item->setText(tr("Operate by Instruction"));
228 229
    item->setCheckable(true);
    item->setDefaultValue(false);
230
    item->setIcon(QIcon(QLatin1String(":/debugger/images/debugger_singleinstructionmode.png")));
231 232 233 234
    item->setToolTip(tr("This switches the debugger to instruction-wise "
        "operation mode. In this mode, stepping operates on single "
        "instructions and the source location view also shows the "
        "disassembled instructions."));
235
    item->setIconVisibleInMenu(false);
236
    instance->insertItem(OperateByInstruction, item);
237

238
    item = new SavedAction(instance);
239
    item->setText(tr("Dereference Pointers Automatically"));
240 241
    item->setCheckable(true);
    item->setDefaultValue(true);
242
    item->setSettingsKey(debugModeGroup, QLatin1String("AutoDerefPointers"));
243
    item->setToolTip(tr("This switches the Locals&Watchers view to "
Jarek Kobus's avatar
Jarek Kobus committed
244
        "automatically dereference pointers. This saves a level in the "
245 246 247 248
        "tree view, but also loses data for the now-missing intermediate "
        "level."));
    instance->insertItem(AutoDerefPointers, item);

249 250 251
    //
    // Locals & Watchers
    //
252 253
    item = new SavedAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("ShowStandardNamespace"));
254
    item->setText(tr("Show \"std::\" Namespace in Types"));
255 256 257 258 259 260 261
    item->setCheckable(true);
    item->setDefaultValue(true);
    item->setValue(true);
    instance->insertItem(ShowStdNamespace, item);

    item = new SavedAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("ShowQtNamespace"));
262
    item->setText(tr("Show Qt's Namespace in Types"));
263 264 265 266 267
    item->setCheckable(true);
    item->setDefaultValue(true);
    item->setValue(true);
    instance->insertItem(ShowQtNamespace, item);

268 269 270 271 272 273 274 275
    item = new SavedAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("SortStructMembers"));
    item->setText(tr("Sort Members of Classes and Structs Alphabetically"));
    item->setCheckable(true);
    item->setDefaultValue(true);
    item->setValue(true);
    instance->insertItem(SortStructMembers, item);

276
    //
277
    // DebuggingHelper
278
    //
279
    item = new SavedAction(instance);
280
    item->setSettingsKey(debugModeGroup, QLatin1String("UseDebuggingHelper"));
281
    item->setText(tr("Use Debugging Helpers"));
hjk's avatar
hjk committed
282 283
    item->setCheckable(true);
    item->setDefaultValue(true);
284
    item->setValue(true);
285
    instance->insertItem(UseDebuggingHelpers, item);
hjk's avatar
hjk committed
286 287

    item = new SavedAction(instance);
288
    item->setSettingsKey(debugModeGroup, QLatin1String("UseCustomDebuggingHelperLocation"));
hjk's avatar
hjk committed
289
    item->setCheckable(true);
290
    item->setDefaultValue(false);
291
    item->setValue(false);
292
    instance->insertItem(UseCustomDebuggingHelperLocation, item);
hjk's avatar
hjk committed
293 294

    item = new SavedAction(instance);
295
    item->setSettingsKey(debugModeGroup, QLatin1String("CustomDebuggingHelperLocation"));
296 297
    item->setCheckable(true);
    item->setDefaultValue(QString());
298
    item->setValue(QString());
299
    instance->insertItem(CustomDebuggingHelperLocation, item);
300

301
    item = new SavedAction(instance);
302
    item->setSettingsKey(debugModeGroup, QLatin1String("DebugDebuggingHelpers"));
303
    item->setText(tr("Debug Debugging Helpers"));
304
    item->setCheckable(true);
305
    item->setDefaultValue(false);
306
    item->setValue(false);
307
    instance->insertItem(DebugDebuggingHelpers, item);
308

309 310 311 312 313 314 315 316
    item = new SavedAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("UseQmlObserver"));
    item->setText(tr("Use QML Observer"));
    item->setCheckable(true);
    item->setDefaultValue(true);
    item->setValue(true);
    instance->insertItem(UseQmlObserver, item);

317 318
    item = new SavedAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("UseCodeModel"));
319 320 321 322
    item->setText(tr("Use Code Model"));
    item->setToolTip(tr("Selecting this causes the C++ Code Model being asked "
      "for variable scope information. This might result in slightly faster "
      "debugger operation but may fail for optimized code."));
323
    item->setCheckable(true);
324 325
    item->setDefaultValue(true);
    item->setValue(true);
326
    instance->insertItem(UseCodeModel, item);
hjk's avatar
hjk committed
327

hjk's avatar
hjk committed
328 329

    //
330
    // Breakpoints
hjk's avatar
hjk committed
331
    //
332
    item = new SavedAction(instance);
333
    item->setText(tr("Synchronize Breakpoints"));
334
    instance->insertItem(SynchronizeBreakpoints, item);
hjk's avatar
hjk committed
335

336
    item = new SavedAction(instance);
337 338 339 340 341
    item->setText(tr("Use Precise Breakpoints"));
    item->setToolTip(tr("Selecting this causes breakpoint synchronization "
      "being done after each step. This results in up-to-date breakpoint "
      "information on whether a breakpoint has been resolved after "
      "loading shared libraries, but slows down stepping."));
342
    item->setCheckable(true);
343 344
    item->setDefaultValue(false);
    item->setValue(false);
345 346 347
    item->setSettingsKey(debugModeGroup, QLatin1String("UsePreciseBreakpoints"));
    instance->insertItem(UsePreciseBreakpoints, item);

348 349 350 351 352 353 354 355 356 357 358 359 360 361
    item = new SavedAction(instance);
    item->setText(tr("Adjust Breakpoint Locations"));
    item->setToolTip(tr("Not all source code lines generate "
      "executable code. Putting a breakpoint on such a line acts as "
      "if the breakpoint was set on the next line that generated code. "
      "Selecting 'Adjust Breakpoint Locations' shifts the red "
      "breakpoint markers in such cases to the location of the true "
      "breakpoint."));
    item->setCheckable(true);
    item->setDefaultValue(true);
    item->setValue(true);
    item->setSettingsKey(debugModeGroup, QLatin1String("AdjustBreakpointLocations"));
    instance->insertItem(AdjustBreakpointLocations, item);

362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377
    item = new SavedAction(instance);
    item->setText(tr("Break on \"throw\""));
    item->setCheckable(true);
    item->setDefaultValue(false);
    item->setValue(false);
    item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnThrow"));
    instance->insertItem(BreakOnThrow, item);

    item = new SavedAction(instance);
    item->setText(tr("Break on \"catch\""));
    item->setCheckable(true);
    item->setDefaultValue(false);
    item->setValue(false);
    item->setSettingsKey(debugModeGroup, QLatin1String("BreakOnCatch"));
    instance->insertItem(BreakOnCatch, item);

378 379
    //
    // Settings
hjk's avatar
hjk committed
380 381
    //

382
    item = new SavedAction(instance);
383
    item->setSettingsKey(debugModeGroup, QLatin1String("Environment"));
384
    item->setDefaultValue(QString());
385
    instance->insertItem(GdbEnvironment, item);
hjk's avatar
hjk committed
386

387
    item = new SavedAction(instance);
388
    item->setSettingsKey(debugModeGroup, QLatin1String("ScriptFile"));
389
    item->setDefaultValue(QString());
390
    instance->insertItem(GdbScriptFile, item);
391

392
    item = new SavedAction(instance);
393
    item->setSettingsKey(debugModeGroup, QLatin1String("AutoQuit"));
394
    item->setText(tr("Automatically Quit Debugger"));
hjk's avatar
hjk committed
395
    item->setCheckable(true);
396
    item->setDefaultValue(false);
hjk's avatar
hjk committed
397
    instance->insertItem(AutoQuit, item);
398

399
    item = new SavedAction(instance);
400
    item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTips"));
401
    item->setText(tr("Use tooltips in main editor when debugging"));
402 403 404 405
    item->setToolTip(tr("Checking this will enable tooltips for variable "
        "values during debugging. Since this can slow down debugging and "
        "does not provide reliable information as it does not use scope "
        "information, it is switched off by default."));
hjk's avatar
hjk committed
406
    item->setCheckable(true);
407
    item->setDefaultValue(false);
408 409 410 411
    instance->insertItem(UseToolTipsInMainEditor, item);

    item = new SavedAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInLocalsView"));
412
    item->setText(tr("Use Tooltips in Locals View When Debugging"));
413 414
    item->setToolTip(tr("Checking this will enable tooltips in the locals "
        "view during debugging."));
415 416 417
    item->setCheckable(true);
    item->setDefaultValue(false);
    instance->insertItem(UseToolTipsInLocalsView, item);
hjk's avatar
hjk committed
418

419
    item = new SavedAction(instance);
420
    item->setSettingsKey(debugModeGroup, QLatin1String("UseToolTipsInBreakpointsView"));
421
    item->setText(tr("Use Tooltips in Breakpoints View When Debugging"));
422 423 424 425 426 427 428 429
    item->setToolTip(tr("Checking this will enable tooltips in the breakpoints "
        "view during debugging."));
    item->setCheckable(true);
    item->setDefaultValue(false);
    instance->insertItem(UseToolTipsInBreakpointsView, item);

    item = new SavedAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInBreakpointsView"));
430
    item->setText(tr("Show Address Data in Breakpoints View When Debugging"));
431 432 433 434 435 436 437 438
    item->setToolTip(tr("Checking this will show a column with address "
        "information in the breakpoint view during debugging."));
    item->setCheckable(true);
    item->setDefaultValue(false);
    instance->insertItem(UseAddressInBreakpointsView, item);

    item = new SavedAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("UseAddressInStackView"));
439
    item->setText(tr("Show Address Data in Stack View When Debugging"));
440 441 442 443 444 445 446
    item->setToolTip(tr("Checking this will show a column with address "
        "information in the stack view during debugging."));
    item->setCheckable(true);
    item->setDefaultValue(false);
    instance->insertItem(UseAddressInStackView, item);
    item = new SavedAction(instance);

447
    item->setSettingsKey(debugModeGroup, QLatin1String("ListSourceFiles"));
448
    item->setText(tr("List Source Files"));
449
    item->setCheckable(true);
450
    item->setDefaultValue(false);
451
    instance->insertItem(ListSourceFiles, item);
452

453
    item = new SavedAction(instance);
454
    item->setSettingsKey(debugModeGroup, QLatin1String("SkipKnownFrames"));
455 456 457 458
    item->setText(tr("Skip Known Frames"));
    item->setToolTip(tr("Selecting this results in well-known but usually "
      "not interesting frames belonging to reference counting and "
      "signal emission being skipped while single-stepping."));
hjk's avatar
hjk committed
459
    item->setCheckable(true);
460
    item->setDefaultValue(false);
461
    instance->insertItem(SkipKnownFrames, item);
462 463 464

    item = new SavedAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("EnableReverseDebugging"));
465
    item->setText(tr("Enable Reverse Debugging"));
466
    item->setCheckable(true);
467
    item->setDefaultValue(false);
468
    instance->insertItem(EnableReverseDebugging, item);
469

470 471 472 473 474 475 476 477 478
#ifdef Q_OS_WIN
    item = new RegisterPostMortemAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("RegisterForPostMortem"));
    item->setText(tr("Register For Post-Mortem Debugging"));
    item->setCheckable(true);
    item->setDefaultValue(false);
    instance->insertItem(RegisterForPostMortem, item);
#endif

479
    item = new SavedAction(instance);
480
    item->setSettingsKey(debugModeGroup, QLatin1String("AllPluginBreakpoints"));
hjk's avatar
hjk committed
481
    item->setDefaultValue(true);
482
    instance->insertItem(AllPluginBreakpoints, item);
483

484
    item = new SavedAction(instance);
485
    item->setSettingsKey(debugModeGroup, QLatin1String("SelectedPluginBreakpoints"));
486
    item->setDefaultValue(false);
487
    instance->insertItem(SelectedPluginBreakpoints, item);
488

489
    item = new SavedAction(instance);
490
    item->setSettingsKey(debugModeGroup, QLatin1String("NoPluginBreakpoints"));
491
    item->setDefaultValue(false);
492
    instance->insertItem(NoPluginBreakpoints, item);
493

494
    item = new SavedAction(instance);
495
    item->setSettingsKey(debugModeGroup, QLatin1String("SelectedPluginBreakpointsPattern"));
496
    item->setDefaultValue(QLatin1String(".*"));
497 498 499
    instance->insertItem(SelectedPluginBreakpointsPattern, item);

    item = new SavedAction(instance);
500
    item->setSettingsKey(debugModeGroup, QLatin1String("MaximalStackDepth"));
501 502
    item->setDefaultValue(20);
    instance->insertItem(MaximalStackDepth, item);
hjk's avatar
hjk committed
503

504
    item = new SavedAction(instance);
505
    item->setText(tr("Reload Full Stack"));
506 507
    instance->insertItem(ExpandStack, item);

508 509 510 511
    item = new SavedAction(instance);
    item->setText(tr("Create Full Backtrace"));
    instance->insertItem(CreateFullBacktrace, item);

512
    item = new SavedAction(instance);
513
    item->setText(tr("Execute Line"));
514 515
    instance->insertItem(ExecuteCommand, item);

516 517 518 519 520
    item = new SavedAction(instance);
    item->setSettingsKey(debugModeGroup, QLatin1String("WatchdogTimeout"));
    item->setDefaultValue(20);
    instance->insertItem(GdbWatchdogTimeout, item);

521
    return instance;
hjk's avatar
hjk committed
522 523
}

524

525 526 527 528 529 530
//////////////////////////////////////////////////////////////////////////
//
// DebuggerActions
//
//////////////////////////////////////////////////////////////////////////

531
SavedAction *theDebuggerAction(int code)
hjk's avatar
hjk committed
532
{
533
    return DebuggerSettings::instance()->item(code);
hjk's avatar
hjk committed
534 535 536 537
}

bool theDebuggerBoolSetting(int code)
{
538
    return DebuggerSettings::instance()->item(code)->value().toBool();
hjk's avatar
hjk committed
539 540 541 542
}

QString theDebuggerStringSetting(int code)
{
543
    return DebuggerSettings::instance()->item(code)->value().toString();
hjk's avatar
hjk committed
544 545
}

hjk's avatar
hjk committed
546 547 548
} // namespace Internal
} // namespace Debugger