diff options
Diffstat (limited to 'src/plugins/debugger/qml/qmlv8debuggerclient.cpp')
-rw-r--r-- | src/plugins/debugger/qml/qmlv8debuggerclient.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp index 1ce9aa8ff7..9067ec08c3 100644 --- a/src/plugins/debugger/qml/qmlv8debuggerclient.cpp +++ b/src/plugins/debugger/qml/qmlv8debuggerclient.cpp @@ -1310,13 +1310,22 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data) BreakpointModelId id = d->breakpointsSync.take(seq); d->breakpoints.insert(id, index); - BreakHandler *handler = d->engine->breakHandler(); - if (handler->state(id) != BreakpointInserted) { - BreakpointResponse br = handler->response(id); - br.lineNumber = breakpointData.value(_("line") - ).toInt() + 1; - handler->setResponse(id, br); - handler->notifyBreakpointInsertOk(id); + //Is actual position info present? Then breakpoint was + //accepted + const QVariantList actualLocations = + breakpointData.value( + _("actual_locations")).toList(); + if (actualLocations.count()) { + //The breakpoint requested line should be same as + //actual line + BreakHandler *handler = d->engine->breakHandler(); + if (handler->state(id) != BreakpointInserted) { + BreakpointResponse br = handler->response(id); + br.lineNumber = breakpointData.value(_("line") + ).toInt() + 1; + handler->setResponse(id, br); + handler->notifyBreakpointInsertOk(id); + } } @@ -1481,6 +1490,12 @@ void QmlV8DebuggerClient::messageReceived(const QByteArray &data) br.functionName = invocationText; handler->setResponse(id, br); } + if (handler->state(id) != BreakpointInserted) { + br.lineNumber = breakData.value( + _("sourceLine")).toInt() + 1; + handler->setResponse(id, br); + handler->notifyBreakpointInsertOk(id); + } } } } |