Debugger: Set breakpoints on actual locations in code

This fix sets moves breakpoints on commented lines to the next executable line.

Change-Id: Ie9ca8a7c6e0360ce4a916053ef7aedd1cc28484d
Reviewed-on: http://codereview.qt.nokia.com/3525
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
Aurindam Jana
2011-08-24 17:32:12 +02:00
parent e3849b5ebd
commit 21e50d82df
2 changed files with 5 additions and 11 deletions

View File

@@ -416,12 +416,8 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data)
QString event(value.findChild("event").toVariant().toString());
if (event == "break") {
//Check if this break is due to a breakpoint
QList<QVariant> breakpoints = value.findChild("body").findChild("breakpoints").toVariant().toList();
if (breakpoints.count()) {
d->engine->inferiorSpontaneousStop();
listBreakpoints();
}
d->engine->inferiorSpontaneousStop();
listBreakpoints();
}
}
}
@@ -577,7 +573,6 @@ void QmlV8DebuggerClient::updateBreakpoints(QByteArray &message)
{
JsonValue response(message);
JsonValue refs = response.findChild("refs");
JsonValue body = response.findChild("body");
QList<JsonValue> breakpoints = body.findChild("breakpoints").children();