DAP: Fix start CMake debug mode

Change-Id: I2951142736b0e6ccf2b08a7bd78b08b1e96bca6f
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Artem Sokolovskii
2023-07-14 11:07:56 +02:00
parent c43a2ee1c4
commit 4a0a6f07e7
4 changed files with 3 additions and 12 deletions

View File

@@ -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

View File

@@ -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();

View File

@@ -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();

View File

@@ -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);