aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerplugin.cpp
diff options
context:
space:
mode:
authorArtem Sokolovskii <[email protected]>2023-08-25 15:40:18 +0200
committerArtem Sokolovskii <[email protected]>2023-08-31 08:06:03 +0000
commitcecf577dc497ff75d9b6681b25cb72cdaa821d71 (patch)
tree251424c0e1077401e840042a6e32e127a9a0bc18 /src/plugins/debugger/debuggerplugin.cpp
parent270a9839e2d7ca9bfe39dd72e2f7e541ba0d625e (diff)
DAP: Add Python debugging
Added Python support to the DAP engine in Qt Creator. Note: Locals aren't displayed for python. It will be fixed in the following commit. Change-Id: I6d3b41fecc98b92951ed0522e9201401293034d7 Reviewed-by: <[email protected]> Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index f155365bd7e..04c78ca205c 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1242,11 +1242,15 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo
{
EngineManager::registerDefaultPerspective(Tr::tr("CMake Preset"),
"DAP",
- ProjectExplorer::Constants::CMAKE_DEBUG_RUN_MODE);
+ Constants::DAP_PERSPECTIVE_ID);
EngineManager::registerDefaultPerspective(Tr::tr("GDB Preset"),
"DAP",
- ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE);
+ Constants::DAP_PERSPECTIVE_ID);
+
+ EngineManager::registerDefaultPerspective(Tr::tr("Python Preset"),
+ "DAP",
+ Constants::DAP_PERSPECTIVE_ID);
auto breakpointManagerView = createBreakpointManagerView("DAPDebugger.BreakWindow");
auto breakpointManagerWindow
@@ -1265,11 +1269,14 @@ void DebuggerPluginPrivate::createDapDebuggerPerspective(QWidget *globalLogWindo
connect(&m_startDapAction, &QAction::triggered, this, [] {
QComboBox *combo = qobject_cast<QComboBox *>(EngineManager::dapEngineChooser());
if (combo->currentText() == "CMake Preset") {
- ProjectExplorerPlugin::runStartupProject(ProjectExplorer::Constants::CMAKE_DEBUG_RUN_MODE,
- true);
+ ProjectExplorerPlugin::runStartupProject(
+ ProjectExplorer::Constants::DAP_CMAKE_DEBUG_RUN_MODE, false);
+ } else if (combo->currentText() == "GDB Preset") {
+ ProjectExplorerPlugin::runStartupProject(
+ ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE, false);
} else {
ProjectExplorerPlugin::runStartupProject(
- ProjectExplorer::Constants::DAP_GDB_DEBUG_RUN_MODE, true);
+ ProjectExplorer::Constants::DAP_PY_DEBUG_RUN_MODE, false);
}
});