Debugger: Fix removing breakpoints for pdb

...if the break point has not yet got a response id we
end up in an interactive prompt of pdb asking for the
breakpoint to remove. Avoid this as this leads to other
follow-up problems.

Change-Id: Ifa2b5385b61af6bf05b816c8e82d2b515525805b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2018-10-19 14:45:50 +02:00
parent eebfc5f5de
commit c66b2cdef7

View File

@@ -264,6 +264,10 @@ void PdbEngine::removeBreakpoint(const Breakpoint &bp)
QTC_ASSERT(bp, return);
QTC_CHECK(bp->state() == BreakpointRemoveRequested);
notifyBreakpointRemoveProceeding(bp);
if (bp->responseId().isEmpty()) {
notifyBreakpointRemoveFailed(bp);
return;
}
showMessage(QString("DELETING BP %1 IN %2")
.arg(bp->responseId()).arg(bp->fileName()));
postDirectCommand("clear " + bp->responseId());