forked from qt-creator/qt-creator
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: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -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 ¶ms = 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);
|
||||
|
||||
} else {
|
||||
int breakpoint = d->breakpoints.value(id);
|
||||
d->changeBreakpoint(breakpoint, params.enabled, QLatin1String(params.condition),
|
||||
params.ignoreCount);
|
||||
}
|
||||
|
||||
BreakpointResponse br = handler->response(id);
|
||||
br.enabled = params.enabled;
|
||||
br.condition = params.condition;
|
||||
br.ignoreCount = params.ignoreCount;
|
||||
handler->setResponse(id, br);
|
||||
} else {
|
||||
//V8 supports only minimalistic changes in breakpoint
|
||||
//Remove the breakpoint and add again
|
||||
removeBreakpoint(id);
|
||||
d->engine->insertBreakpoint(id);
|
||||
}
|
||||
}
|
||||
|
||||
void QmlV8DebuggerClient::synchronizeBreakpoints()
|
||||
|
Reference in New Issue
Block a user