diff --git a/src/core/MainWindow.cpp b/src/core/MainWindow.cpp index 20e96242..7c428bb9 100644 --- a/src/core/MainWindow.cpp +++ b/src/core/MainWindow.cpp @@ -1203,7 +1203,12 @@ void MainWindow::showDebugDocks() void MainWindow::enableDebugWidgetsMenu(bool enable) { - ui->menuAddDebugWidgets->setEnabled(enable); + for (QAction *action : ui->menuAddDebugWidgets->actions()) { + // The breakpoints menu should be available outside of debug + if (!action->text().contains("Breakpoints")) { + action->setEnabled(enable); + } + } } void MainWindow::resetToDefaultLayout() diff --git a/src/menus/DisassemblyContextMenu.cpp b/src/menus/DisassemblyContextMenu.cpp index a4b40760..5c012204 100644 --- a/src/menus/DisassemblyContextMenu.cpp +++ b/src/menus/DisassemblyContextMenu.cpp @@ -151,6 +151,7 @@ DisassemblyContextMenu::DisassemblyContextMenu(QWidget *parent, MainWindow *main addSeparator(); + addBreakpointMenu(); addDebugMenu(); addSeparator(); @@ -294,16 +295,21 @@ void DisassemblyContextMenu::addEditMenu() editMenu->addAction(&actionJmpReverse); } -void DisassemblyContextMenu::addDebugMenu() +void DisassemblyContextMenu::addBreakpointMenu() { - debugMenu = addMenu(tr("Debug")); + breakpointMenu = addMenu(tr("Breakpoint")); initAction(&actionAddBreakpoint, tr("Add/remove breakpoint"), SLOT(on_actionAddBreakpoint_triggered()), getAddBPSequence()); - debugMenu->addAction(&actionAddBreakpoint); + breakpointMenu->addAction(&actionAddBreakpoint); initAction(&actionAdvancedBreakpoint, tr("Advanced breakpoint"), SLOT(on_actionAdvancedBreakpoint_triggered()), QKeySequence(Qt::CTRL+Qt::Key_F2)); - debugMenu->addAction(&actionAdvancedBreakpoint); + breakpointMenu->addAction(&actionAdvancedBreakpoint); +} + +void DisassemblyContextMenu::addDebugMenu() +{ + debugMenu = addMenu(tr("Debug")); initAction(&actionContinueUntil, tr("Continue until line"), SLOT(on_actionContinueUntil_triggered())); diff --git a/src/menus/DisassemblyContextMenu.h b/src/menus/DisassemblyContextMenu.h index 43e3279a..0375ccc4 100644 --- a/src/menus/DisassemblyContextMenu.h +++ b/src/menus/DisassemblyContextMenu.h @@ -157,9 +157,11 @@ private: QMenu *debugMenu; QAction actionContinueUntil; + QAction actionSetPC; + + QMenu *breakpointMenu; QAction actionAddBreakpoint; QAction actionAdvancedBreakpoint; - QAction actionSetPC; QMenu *pluginMenu; @@ -197,6 +199,7 @@ private: void addSetAsMenu(); void addSetToDataMenu(); void addEditMenu(); + void addBreakpointMenu(); void addDebugMenu(); struct ThingUsedHere {