CMake Debugging: Do not build/deploy

Fixes: QTCREATORBUG-30045
Change-Id: I478abaf29462d9413f3285527459a98b1cae899d
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2023-12-11 08:11:23 +01:00
parent 1633d76b76
commit d3c805630a
2 changed files with 11 additions and 8 deletions

View File

@@ -171,7 +171,7 @@ CMakeManager::CMakeManager()
mdebugger->addAction(command, Constants::CMAKE_DEBUGGING_GROUP); mdebugger->addAction(command, Constants::CMAKE_DEBUGGING_GROUP);
connect(m_cmakeDebuggerAction, &QAction::triggered, this, [] { connect(m_cmakeDebuggerAction, &QAction::triggered, this, [] {
ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE, ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE,
false); true);
}); });
connect(ProjectManager::instance(), &ProjectManager::startupProjectChanged, this, [this] { connect(ProjectManager::instance(), &ProjectManager::startupProjectChanged, this, [this] {

View File

@@ -1243,13 +1243,15 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo
{ {
QString name; QString name;
char const *runMode; char const *runMode;
bool forceSkipDeploy = false;
}; };
const QList<DapPerspective> perspectiveList = { const QList<DapPerspective> perspectiveList = {
DapPerspective{Tr::tr("CMake Preset"), ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE}, DapPerspective{Tr::tr("CMake Preset"),
ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE,
/*forceSkipDeploy=*/true},
DapPerspective{Tr::tr("GDB Preset"), ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE}, DapPerspective{Tr::tr("GDB Preset"), ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE},
DapPerspective{Tr::tr("Python Preset"), DapPerspective{Tr::tr("Python Preset"), ProjectExplorer::Constants::DAP_PY_DEBUG_RUN_MODE},
ProjectExplorer::Constants::DAP_PY_DEBUG_RUN_MODE},
}; };
for (const DapPerspective &dp : perspectiveList) for (const DapPerspective &dp : perspectiveList)
@@ -1257,10 +1259,11 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo
connect(&m_startDapAction, &QAction::triggered, this, [perspectiveList] { connect(&m_startDapAction, &QAction::triggered, this, [perspectiveList] {
QComboBox *combo = qobject_cast<QComboBox *>(EngineManager::dapEngineChooser()); QComboBox *combo = qobject_cast<QComboBox *>(EngineManager::dapEngineChooser());
if (perspectiveList.size() > combo->currentIndex()) if (perspectiveList.size() > combo->currentIndex()) {
ProjectExplorerPlugin::runStartupProject(perspectiveList.at(combo->currentIndex()) const DapPerspective dapPerspective = perspectiveList.at(combo->currentIndex());
.runMode, ProjectExplorerPlugin::runStartupProject(dapPerspective.runMode,
false); dapPerspective.forceSkipDeploy);
}
}); });
auto breakpointManagerView = createBreakpointManagerView("DAPDebugger.BreakWindow"); auto breakpointManagerView = createBreakpointManagerView("DAPDebugger.BreakWindow");