diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp index 1dfc03af62f..9720c134608 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp @@ -171,7 +171,7 @@ CMakeManager::CMakeManager() mdebugger->addAction(command, Constants::CMAKE_DEBUGGING_GROUP); connect(m_cmakeDebuggerAction, &QAction::triggered, this, [] { ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE, - false); + true); }); connect(ProjectManager::instance(), &ProjectManager::startupProjectChanged, this, [this] { diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index bb90a260cc9..6b74567e359 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1243,13 +1243,15 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo { QString name; char const *runMode; + bool forceSkipDeploy = false; }; const QList 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("Python Preset"), - ProjectExplorer::Constants::DAP_PY_DEBUG_RUN_MODE}, + DapPerspective{Tr::tr("Python Preset"), ProjectExplorer::Constants::DAP_PY_DEBUG_RUN_MODE}, }; for (const DapPerspective &dp : perspectiveList) @@ -1257,10 +1259,11 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo connect(&m_startDapAction, &QAction::triggered, this, [perspectiveList] { QComboBox *combo = qobject_cast(EngineManager::dapEngineChooser()); - if (perspectiveList.size() > combo->currentIndex()) - ProjectExplorerPlugin::runStartupProject(perspectiveList.at(combo->currentIndex()) - .runMode, - false); + if (perspectiveList.size() > combo->currentIndex()) { + const DapPerspective dapPerspective = perspectiveList.at(combo->currentIndex()); + ProjectExplorerPlugin::runStartupProject(dapPerspective.runMode, + dapPerspective.forceSkipDeploy); + } }); auto breakpointManagerView = createBreakpointManagerView("DAPDebugger.BreakWindow");