forked from qt-creator/qt-creator
Debugger: Give some hint on what to change if QML breakpoints fail
Fixes: QTCREATORBUG-8200 Change-Id: I464a577f14f1e0e03355b2f176e4f6e67cc8459b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -694,17 +694,30 @@ void DebuggerRunTool::start()
|
|||||||
|
|
||||||
if (m_runParameters.startMode == StartInternal) {
|
if (m_runParameters.startMode == StartInternal) {
|
||||||
QStringList unhandledIds;
|
QStringList unhandledIds;
|
||||||
// for (const GlobalBreakpoint &bp : BreakpointManager::globalBreakpoints()) {
|
bool hasQmlBreakpoints = false;
|
||||||
// if (bp->isEnabled() && !m_engine->acceptsBreakpoint(bp))
|
for (const GlobalBreakpoint &gbp : BreakpointManager::globalBreakpoints()) {
|
||||||
// unhandledIds.append(bp.id().toString());
|
if (gbp->isEnabled()) {
|
||||||
// }
|
const BreakpointParameters &bp = gbp->requestedParameters();
|
||||||
|
hasQmlBreakpoints = hasQmlBreakpoints || bp.isQmlFileAndLineBreakpoint();
|
||||||
|
if (!m_engine->acceptsBreakpoint(bp)) {
|
||||||
|
if (!m_engine2 || !m_engine2->acceptsBreakpoint(bp))
|
||||||
|
unhandledIds.append(gbp->displayName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!unhandledIds.isEmpty()) {
|
if (!unhandledIds.isEmpty()) {
|
||||||
QString warningMessage =
|
QString warningMessage =
|
||||||
DebuggerPlugin::tr("Some breakpoints cannot be handled by the debugger "
|
DebuggerPlugin::tr("Some breakpoints cannot be handled by the debugger "
|
||||||
"languages currently active, and will be ignored.\n"
|
"languages currently active, and will be ignored.<p>"
|
||||||
"Affected are breakpoints %1")
|
"Affected are breakpoints %1")
|
||||||
.arg(unhandledIds.join(", "));
|
.arg(unhandledIds.join(", "));
|
||||||
|
|
||||||
|
if (hasQmlBreakpoints) {
|
||||||
|
warningMessage += "<p>" +
|
||||||
|
DebuggerPlugin::tr("QML debugging needs to be enabled both in the Build "
|
||||||
|
"and the Run settings.");
|
||||||
|
}
|
||||||
|
|
||||||
showMessage(warningMessage, LogWarning);
|
showMessage(warningMessage, LogWarning);
|
||||||
|
|
||||||
static bool checked = true;
|
static bool checked = true;
|
||||||
|
Reference in New Issue
Block a user