提交 263527f9 编写于 作者: V visualfc

dlvdebugger: add pass flags option

上级 35a2003b
......@@ -33,5 +33,6 @@
#endif
#define OPTION_DLVDEBUGGER "option/dlvdebugger"
#define DLVDEBUGGER_EXTFLAGS "dlvdebugger/extflags"
#endif // DLVDEBUGGER_GLOBAL_H
......@@ -66,10 +66,10 @@ QString DlvDebuggerOption::mimeType() const
void DlvDebuggerOption::load()
{
ui->flagsLineEdit->setText(m_liteApp->settings()->value(DLVDEBUGGER_EXTFLAGS,"").toString());
}
void DlvDebuggerOption::save()
{
m_liteApp->settings()->setValue(DLVDEBUGGER_EXTFLAGS,ui->flagsLineEdit->text());
}
......@@ -13,7 +13,31 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout"/>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>delve debug pass flags: (example --check-go-version=false)</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="flagsLineEdit"/>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
......
......@@ -58,7 +58,7 @@ bool DlvDebuggerPlugin::load(LiteApi::IApplication *app)
#endif
manager->addDebugger(debug);
manager->setCurrentDebugger(debug);
//app->optionManager()->addFactory(new DlvDebuggerOptionFactory(app,this));
app->optionManager()->addFactory(new DlvDebuggerOptionFactory(app,this));
return true;
}
......
......@@ -25,6 +25,7 @@
#include "fileutil/fileutil.h"
#include "processex/processex.h"
#include "dlvdebuggeroption.h"
#include "dlvdebugger_global.h"
#include "../litedebug/litedebug_global.h"
#include <QStandardItemModel>
......@@ -251,6 +252,14 @@ bool DlvRpcDebugger::start(const QString &cmd, const QString &arguments)
QStringList argsList;
argsList << "--headless" << "--api-version=2" << "--accept-multiclient";
QStringList flags = m_liteApp->settings()->value(DLVDEBUGGER_EXTFLAGS).toString().split(" ",QString::SkipEmptyParts);
if (!flags.isEmpty()) {
foreach(QString flag, flags) {
if (flag.startsWith("--")) {
argsList << flag;
}
}
}
//argsList << "--log";
argsList << "exec" << cmd;
if (!arguments.isEmpty()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册