forked from qt-creator/qt-creator
Debugger: Move debugging helpers settings to Locals & Expressions
They're no longer GDB only. Change-Id: I3aa00be50c85a90c8f81ab9c04c6bb0ec74b7785 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
b60c02bcc0
commit
dfa7e492a1
@@ -30,9 +30,12 @@
|
|||||||
#include "debuggercore.h"
|
#include "debuggercore.h"
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
#include <coreplugin/variablechooser.h>
|
||||||
|
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/savedaction.h>
|
#include <utils/pathchooser.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/savedaction.h>
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
@@ -40,6 +43,7 @@
|
|||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QSpinBox>
|
#include <QSpinBox>
|
||||||
|
#include <QTextEdit>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
@@ -307,6 +311,25 @@ QWidget *LocalsAndExpressionsOptionsPage::widget()
|
|||||||
"std::map in the "Locals and Expressions" view. ")
|
"std::map in the "Locals and Expressions" view. ")
|
||||||
+ QLatin1String("</p></body></html>"));
|
+ QLatin1String("</p></body></html>"));
|
||||||
|
|
||||||
|
auto groupBoxCustomDumperCommands = new QGroupBox(debuggingHelperGroupBox);
|
||||||
|
groupBoxCustomDumperCommands->setTitle(tr("Debugging Helper Customization"));
|
||||||
|
groupBoxCustomDumperCommands->setToolTip(tr(
|
||||||
|
"<html><head/><body><p>Python commands entered here will be executed after Qt Creator's "
|
||||||
|
"debugging helpers have been loaded and fully initialized. You can load additional "
|
||||||
|
"debugging helpers or modify existing ones here.</p></body></html>"));
|
||||||
|
|
||||||
|
auto textEditCustomDumperCommands = new QTextEdit(groupBoxCustomDumperCommands);
|
||||||
|
textEditCustomDumperCommands->setAcceptRichText(false);
|
||||||
|
textEditCustomDumperCommands->setToolTip(groupBoxCustomDumperCommands->toolTip());
|
||||||
|
|
||||||
|
auto groupBoxExtraDumperFile = new QGroupBox(debuggingHelperGroupBox);
|
||||||
|
groupBoxExtraDumperFile->setTitle(tr("Extra Debugging Helpers"));
|
||||||
|
groupBoxExtraDumperFile->setToolTip(tr(
|
||||||
|
"Path to a Python file containing additional data dumpers."));
|
||||||
|
|
||||||
|
auto pathChooserExtraDumperFile = new Utils::PathChooser(groupBoxExtraDumperFile);
|
||||||
|
pathChooserExtraDumperFile->setExpectedKind(Utils::PathChooser::File);
|
||||||
|
|
||||||
auto checkBoxUseCodeModel = new QCheckBox(debuggingHelperGroupBox);
|
auto checkBoxUseCodeModel = new QCheckBox(debuggingHelperGroupBox);
|
||||||
auto checkBoxShowThreadNames = new QCheckBox(debuggingHelperGroupBox);
|
auto checkBoxShowThreadNames = new QCheckBox(debuggingHelperGroupBox);
|
||||||
auto checkBoxShowStdNamespace = new QCheckBox(m_widget);
|
auto checkBoxShowStdNamespace = new QCheckBox(m_widget);
|
||||||
@@ -325,10 +348,16 @@ QWidget *LocalsAndExpressionsOptionsPage::widget()
|
|||||||
spinBoxDisplayStringLimit->setSingleStep(10);
|
spinBoxDisplayStringLimit->setSingleStep(10);
|
||||||
spinBoxDisplayStringLimit->setValue(100);
|
spinBoxDisplayStringLimit->setValue(100);
|
||||||
|
|
||||||
auto verticalLayout = new QVBoxLayout(debuggingHelperGroupBox);
|
auto chooser = new VariableChooser(m_widget);
|
||||||
verticalLayout->addWidget(label);
|
chooser->addSupportedWidget(textEditCustomDumperCommands);
|
||||||
verticalLayout->addWidget(checkBoxUseCodeModel);
|
chooser->addSupportedWidget(pathChooserExtraDumperFile->lineEdit());
|
||||||
verticalLayout->addWidget(checkBoxShowThreadNames);
|
|
||||||
|
auto gridLayout = new QGridLayout(debuggingHelperGroupBox);
|
||||||
|
gridLayout->addWidget(label, 0, 0, 1, 1);
|
||||||
|
gridLayout->addWidget(checkBoxUseCodeModel, 1, 0, 1, 1);
|
||||||
|
gridLayout->addWidget(checkBoxShowThreadNames, 2, 0, 1, 1);
|
||||||
|
gridLayout->addWidget(groupBoxExtraDumperFile, 3, 0, 1, 1);
|
||||||
|
gridLayout->addWidget(groupBoxCustomDumperCommands, 0, 1, 4, 1);
|
||||||
|
|
||||||
auto layout1 = new QFormLayout;
|
auto layout1 = new QFormLayout;
|
||||||
layout1->addItem(new QSpacerItem(10, 10));
|
layout1->addItem(new QSpacerItem(10, 10));
|
||||||
@@ -348,8 +377,16 @@ QWidget *LocalsAndExpressionsOptionsPage::widget()
|
|||||||
layout->addLayout(lowerLayout);
|
layout->addLayout(lowerLayout);
|
||||||
layout->addStretch();
|
layout->addStretch();
|
||||||
|
|
||||||
|
auto customDumperLayout = new QGridLayout(groupBoxCustomDumperCommands);
|
||||||
|
customDumperLayout->addWidget(textEditCustomDumperCommands, 0, 0, 1, 1);
|
||||||
|
|
||||||
|
auto extraDumperLayout = new QGridLayout(groupBoxExtraDumperFile);
|
||||||
|
extraDumperLayout->addWidget(pathChooserExtraDumperFile, 0, 0, 1, 1);
|
||||||
|
|
||||||
m_group.clear();
|
m_group.clear();
|
||||||
m_group.insert(action(UseDebuggingHelpers), debuggingHelperGroupBox);
|
m_group.insert(action(UseDebuggingHelpers), debuggingHelperGroupBox);
|
||||||
|
m_group.insert(action(ExtraDumperFile), pathChooserExtraDumperFile);
|
||||||
|
m_group.insert(action(ExtraDumperCommands), textEditCustomDumperCommands);
|
||||||
m_group.insert(action(UseCodeModel), checkBoxUseCodeModel);
|
m_group.insert(action(UseCodeModel), checkBoxUseCodeModel);
|
||||||
m_group.insert(action(ShowThreadNames), checkBoxShowThreadNames);
|
m_group.insert(action(ShowThreadNames), checkBoxShowThreadNames);
|
||||||
m_group.insert(action(ShowStdNamespace), checkBoxShowStdNamespace);
|
m_group.insert(action(ShowStdNamespace), checkBoxShowStdNamespace);
|
||||||
|
|||||||
@@ -193,26 +193,6 @@ GdbOptionsPageWidget::GdbOptionsPageWidget()
|
|||||||
textEditPostAttachCommands->setAcceptRichText(false);
|
textEditPostAttachCommands->setAcceptRichText(false);
|
||||||
textEditPostAttachCommands->setToolTip(groupBoxPostAttachCommands->toolTip());
|
textEditPostAttachCommands->setToolTip(groupBoxPostAttachCommands->toolTip());
|
||||||
|
|
||||||
auto groupBoxCustomDumperCommands = new QGroupBox(this);
|
|
||||||
groupBoxCustomDumperCommands->setTitle(GdbOptionsPage::tr("Debugging Helper Customization"));
|
|
||||||
groupBoxCustomDumperCommands->setToolTip(GdbOptionsPage::tr(
|
|
||||||
"<html><head/><body><p>GDB commands entered here will be executed after "
|
|
||||||
"Qt Creator's debugging helpers have been loaded and fully initialized. "
|
|
||||||
"You can load additional debugging helpers or modify existing ones here.</p>"
|
|
||||||
"%1</body></html>").arg(howToUsePython));
|
|
||||||
|
|
||||||
auto textEditCustomDumperCommands = new QTextEdit(groupBoxCustomDumperCommands);
|
|
||||||
textEditCustomDumperCommands->setAcceptRichText(false);
|
|
||||||
textEditCustomDumperCommands->setToolTip(groupBoxCustomDumperCommands->toolTip());
|
|
||||||
|
|
||||||
auto groupBoxExtraDumperFile = new QGroupBox(this);
|
|
||||||
groupBoxExtraDumperFile->setTitle(GdbOptionsPage::tr("Extra Debugging Helpers"));
|
|
||||||
groupBoxExtraDumperFile->setToolTip(GdbOptionsPage::tr(
|
|
||||||
"Path to a Python file containing additional data dumpers."));
|
|
||||||
|
|
||||||
auto pathChooserExtraDumperFile = new Utils::PathChooser(groupBoxExtraDumperFile);
|
|
||||||
pathChooserExtraDumperFile->setExpectedKind(Utils::PathChooser::File);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
groupBoxPluginDebugging = new QGroupBox(q);
|
groupBoxPluginDebugging = new QGroupBox(q);
|
||||||
groupBoxPluginDebugging->setTitle(GdbOptionsPage::tr(
|
groupBoxPluginDebugging->setTitle(GdbOptionsPage::tr(
|
||||||
@@ -240,10 +220,8 @@ GdbOptionsPageWidget::GdbOptionsPageWidget()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
auto chooser = new VariableChooser(this);
|
auto chooser = new VariableChooser(this);
|
||||||
chooser->addSupportedWidget(textEditCustomDumperCommands);
|
|
||||||
chooser->addSupportedWidget(textEditPostAttachCommands);
|
chooser->addSupportedWidget(textEditPostAttachCommands);
|
||||||
chooser->addSupportedWidget(textEditStartupCommands);
|
chooser->addSupportedWidget(textEditStartupCommands);
|
||||||
chooser->addSupportedWidget(pathChooserExtraDumperFile->lineEdit());
|
|
||||||
|
|
||||||
auto formLayout = new QFormLayout(groupBoxGeneral);
|
auto formLayout = new QFormLayout(groupBoxGeneral);
|
||||||
formLayout->addRow(labelGdbWatchdogTimeout, spinBoxGdbWatchdogTimeout);
|
formLayout->addRow(labelGdbWatchdogTimeout, spinBoxGdbWatchdogTimeout);
|
||||||
@@ -262,23 +240,13 @@ GdbOptionsPageWidget::GdbOptionsPageWidget()
|
|||||||
auto postAttachLayout = new QGridLayout(groupBoxPostAttachCommands);
|
auto postAttachLayout = new QGridLayout(groupBoxPostAttachCommands);
|
||||||
postAttachLayout->addWidget(textEditPostAttachCommands, 0, 0, 1, 1);
|
postAttachLayout->addWidget(textEditPostAttachCommands, 0, 0, 1, 1);
|
||||||
|
|
||||||
auto customDumperLayout = new QGridLayout(groupBoxCustomDumperCommands);
|
|
||||||
customDumperLayout->addWidget(textEditCustomDumperCommands, 0, 0, 1, 1);
|
|
||||||
|
|
||||||
auto extraDumperLayout = new QGridLayout(groupBoxExtraDumperFile);
|
|
||||||
extraDumperLayout->addWidget(pathChooserExtraDumperFile, 0, 0, 1, 1);
|
|
||||||
|
|
||||||
auto gridLayout = new QGridLayout(this);
|
auto gridLayout = new QGridLayout(this);
|
||||||
gridLayout->addWidget(groupBoxGeneral, 0, 0, 5, 1);
|
gridLayout->addWidget(groupBoxGeneral, 0, 0, 5, 1);
|
||||||
gridLayout->addWidget(groupBoxExtraDumperFile, 5, 0, 1, 1);
|
|
||||||
|
|
||||||
gridLayout->addWidget(groupBoxStartupCommands, 0, 1, 2, 1);
|
gridLayout->addWidget(groupBoxStartupCommands, 0, 1, 2, 1);
|
||||||
gridLayout->addWidget(groupBoxPostAttachCommands, 2, 1, 2, 1);
|
gridLayout->addWidget(groupBoxPostAttachCommands, 2, 1, 2, 1);
|
||||||
gridLayout->addWidget(groupBoxCustomDumperCommands, 4, 1, 2, 1);
|
|
||||||
|
|
||||||
group.insert(action(GdbStartupCommands), textEditStartupCommands);
|
group.insert(action(GdbStartupCommands), textEditStartupCommands);
|
||||||
group.insert(action(ExtraDumperFile), pathChooserExtraDumperFile);
|
|
||||||
group.insert(action(ExtraDumperCommands), textEditCustomDumperCommands);
|
|
||||||
group.insert(action(GdbPostAttachCommands), textEditPostAttachCommands);
|
group.insert(action(GdbPostAttachCommands), textEditPostAttachCommands);
|
||||||
group.insert(action(LoadGdbInit), checkBoxLoadGdbInit);
|
group.insert(action(LoadGdbInit), checkBoxLoadGdbInit);
|
||||||
group.insert(action(LoadGdbDumpers), checkBoxLoadGdbDumpers);
|
group.insert(action(LoadGdbDumpers), checkBoxLoadGdbDumpers);
|
||||||
|
|||||||
Reference in New Issue
Block a user