forked from qt-creator/qt-creator
DAP: Fix start CMake debug mode
Change-Id: I2951142736b0e6ccf2b08a7bd78b08b1e96bca6f Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -150,7 +150,6 @@ public:
|
||||
bool multiProcess = false; // Whether to set detach-on-fork off.
|
||||
bool useTerminal = false;
|
||||
bool runAsRoot = false;
|
||||
bool cmakeDapDebugging = false;
|
||||
|
||||
ProjectExplorer::Runnable debugger;
|
||||
Utils::FilePath overrideStartScript; // Used in attach to core and remote debugging
|
||||
|
@@ -1724,7 +1724,6 @@ RunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit,
|
||||
debugger->setStartMode(AttachToLocalProcess);
|
||||
debugger->setCloseMode(DetachAtClose);
|
||||
debugger->setContinueAfterAttach(contAfterAttach);
|
||||
debugger->setCmakeDapDebugging(processInfo.executable.endsWith(QLatin1String("cmake")));
|
||||
|
||||
debugger->startRunControl();
|
||||
|
||||
|
@@ -310,11 +310,6 @@ void DebuggerRunTool::setRunAsRoot(bool on)
|
||||
m_runParameters.runAsRoot = on;
|
||||
}
|
||||
|
||||
void DebuggerRunTool::setCmakeDapDebugging(bool on)
|
||||
{
|
||||
m_runParameters.cmakeDapDebugging = on;
|
||||
}
|
||||
|
||||
void DebuggerRunTool::setCommandsAfterConnect(const QString &commands)
|
||||
{
|
||||
m_runParameters.commandsAfterConnect = commands;
|
||||
@@ -491,11 +486,10 @@ void DebuggerRunTool::start()
|
||||
|
||||
runControl()->setDisplayName(m_runParameters.displayName);
|
||||
|
||||
if (!m_engine && m_runParameters.cmakeDapDebugging)
|
||||
m_engine = createDapEngine();
|
||||
|
||||
if (!m_engine) {
|
||||
if (m_runParameters.isCppDebugging()) {
|
||||
if (runControl()->runMode() == ProjectExplorer::Constants::CMAKE_DEBUG_RUN_MODE)
|
||||
m_engine = createDapEngine();
|
||||
else if (m_runParameters.isCppDebugging()) {
|
||||
switch (m_runParameters.cppEngineType) {
|
||||
case GdbEngineType:
|
||||
m_engine = createGdbEngine();
|
||||
|
@@ -84,7 +84,6 @@ public:
|
||||
void setBreakOnMain(bool on);
|
||||
void setUseTerminal(bool on);
|
||||
void setRunAsRoot(bool on);
|
||||
void setCmakeDapDebugging(bool on);
|
||||
|
||||
void setCommandsAfterConnect(const QString &commands);
|
||||
void setCommandsForReset(const QString &commands);
|
||||
|
Reference in New Issue
Block a user