Commit 2cf515d8 authored by Aurindam Jana's avatar Aurindam Jana
Browse files

QmlV8DebuggerClient: Change breakpoint line number

V8 Debugger does not support changing line numbers of active
brekpoints. Remove the existing breakpoint and add a new one.

Change-Id: I0e6302d6d911887890d674960cc241f89c4cdc96
Reviewed-by: default avatarKai Koehne <>
parent 8624b3e1
......@@ -91,6 +91,8 @@ public:
QmlAdapter *adapter() const;
void insertBreakpoint(BreakpointModelId id);
public slots:
void disconnected();
void documentUpdated(QmlJS::Document::Ptr doc);
......@@ -130,7 +132,6 @@ private:
void selectThread(int index);
void attemptBreakpointSynchronization();
void insertBreakpoint(BreakpointModelId id);
void removeBreakpoint(BreakpointModelId id);
void changeBreakpoint(BreakpointModelId id);
bool acceptsBreakpoint(BreakpointModelId id) const;
......@@ -1131,23 +1131,21 @@ void QmlV8DebuggerClient::changeBreakpoint(const BreakpointModelId &id)
BreakHandler *handler = d->engine->breakHandler();
const BreakpointParameters &params = handler->breakpointData(id);
BreakpointResponse br = handler->response(id);
if (params.type == BreakpointAtJavaScriptThrow) {
d->setExceptionBreak(AllExceptions, params.enabled);
br.enabled = params.enabled;
handler->setResponse(id, br);
} else if (params.type == BreakpointOnQmlSignalHandler) {
d->setBreakpoint(QString(_(EVENT)), params.functionName, params.enabled);
br.enabled = params.enabled;
handler->setResponse(id, br);
} else {
int breakpoint = d->breakpoints.value(id);
d->changeBreakpoint(breakpoint, params.enabled, QLatin1String(params.condition),
//V8 supports only minimalistic changes in breakpoint
//Remove the breakpoint and add again
BreakpointResponse br = handler->response(id);
br.enabled = params.enabled;
br.condition = params.condition;
br.ignoreCount = params.ignoreCount;
handler->setResponse(id, br);
void QmlV8DebuggerClient::synchronizeBreakpoints()
Supports Markdown
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