Commit a150d5f4 authored by Kai Koehne's avatar Kai Koehne
Browse files

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.
parent 5f297fb1
...@@ -248,6 +248,23 @@ void DebuggerRunControl::start() ...@@ -248,6 +248,23 @@ void DebuggerRunControl::start()
return; 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); debuggerCore()->runControlStarted(d->m_engine);
// We might get a synchronous startFailed() notification on Windows, // We might get a synchronous startFailed() notification on Windows,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment