forked from qt-creator/qt-creator
QmlDebugger: Make JS breakpoints not pending when they're hit
Task-number: QTCREATORBUG-2590 Reviewed-by: Christiaan Janssen
This commit is contained in:
@@ -661,9 +661,34 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
||||
tr("<p>An Uncaught Exception occured in <i>%1</i>:</p><p>%2</p>")
|
||||
.arg(stackFrames.value(0).file, Qt::escape(error));
|
||||
showMessageBox(QMessageBox::Information, tr("Uncaught Exception"), msg);
|
||||
} else {
|
||||
//
|
||||
// Make breakpoint non-pending
|
||||
//
|
||||
QString file;
|
||||
int line = -1;
|
||||
|
||||
if (!stackFrames.isEmpty()) {
|
||||
file = stackFrames.at(0).file;
|
||||
line = stackFrames.at(0).line;
|
||||
|
||||
if (isShadowBuildProject()) {
|
||||
file = fromShadowBuildFilename(file);
|
||||
}
|
||||
}
|
||||
|
||||
Internal::BreakHandler *handler = breakHandler();
|
||||
for (int index = 0; index != handler->size(); ++index) {
|
||||
Internal::BreakpointData *data = handler->at(index);
|
||||
QString processedFilename = data->fileName;
|
||||
|
||||
if (processedFilename == file
|
||||
&& data->lineNumber == line) {
|
||||
data->pending = false;
|
||||
data->updateMarker();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} else if (command == "RESULT") {
|
||||
Internal::WatchData data;
|
||||
QByteArray iname;
|
||||
|
||||
Reference in New Issue
Block a user