Pdb: Fix debugger start for python debugging

Do not stop at the first statement of the script
when performing "normal" debug, stop at the first
break point instead.
Preserve the original behavior when debugging by
triggering "Start and Break on Main".

Task-number: QTCREATORBUG-28732
Change-Id: I3022071f28c086a2d0787ca5873e611f77e28369
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Christian Stenger
2023-02-10 16:26:52 +01:00
parent bc38ad8c59
commit 4b9054c463
2 changed files with 5 additions and 2 deletions

View File

@@ -378,7 +378,7 @@ QDockWidget *FancyMainWindow::addDockForWidget(QWidget *widget, bool immutable)
dockWidget->setProperty(dockWidgetActiveState, visible);
});
connect(dockWidget->toggleViewAction(), &QAction::triggered, this, [dockWidget] {
connect(dockWidget->toggleViewAction(), &QAction::triggered, dockWidget, [dockWidget] {
if (dockWidget->isVisible())
dockWidget->raise();
}, Qt::QueuedConnection);

View File

@@ -128,7 +128,10 @@ void PdbEngine::handlePdbStarted()
showStatusMessage(Tr::tr("Running requested..."), 5000);
BreakpointManager::claimBreakpointsForEngine(this);
notifyEngineRunAndInferiorStopOk();
if (runParameters().breakOnMain)
updateAll();
else
continueInferior();
}
void PdbEngine::interruptInferior()