Debugger: Add warning if debugger cannot handle breakpoints

This usually happens when a breakpoint is e.g. set in a .qml file,
but QML not selected as the debugger language, or vice versa.
This commit is contained in:
Kai Koehne
2011-04-28 14:05:28 +02:00
parent 5f297fb168
commit a150d5f4b4

View File

@@ -248,6 +248,23 @@ void DebuggerRunControl::start()
return;
}
foreach (const BreakpointId &id, debuggerCore()->breakHandler()->allBreakpointIds()) {
if (!d->m_engine->acceptsBreakpoint(id)) {
debuggerCore()->showMessage(DebuggerPlugin::tr("Some breakpoints cannot be handled by the current debugger, and will be ignored."), LogWarning);
int result = QMessageBox::warning(debuggerCore()->mainWindow(),
DebuggerPlugin::tr("Warning"), DebuggerPlugin::tr("Some breakpoints cannot be handled by the debugger, and will be ignored. Do you want to continue?"),
QMessageBox::Ok | QMessageBox::Cancel);
if (result == QMessageBox::Cancel) {
emit started();
emit finished();
return;
}
break;
}
}
debuggerCore()->runControlStarted(d->m_engine);
// We might get a synchronous startFailed() notification on Windows,