forked from qt-creator/qt-creator
JSDebugger: Break on Exception
The debugger breaks on Javascript exception. The error message is printed on the ScriptConsole and the relevant code is marked with a wavy underline. Change-Id: I5e6f603430c3b8a0db450d1e8c821714ec0140ab Reviewed-on: http://codereview.qt-project.org/4276 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -48,6 +48,21 @@ class QmlV8DebuggerClient : public QmlDebuggerClient
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
enum Exceptions
|
||||
{
|
||||
NoExceptions,
|
||||
UncaughtExceptions,
|
||||
AllExceptions
|
||||
};
|
||||
|
||||
enum StepAction
|
||||
{
|
||||
Continue,
|
||||
In,
|
||||
Out,
|
||||
Next
|
||||
};
|
||||
|
||||
public:
|
||||
explicit QmlV8DebuggerClient(QmlJsDebugClient::QDeclarativeDebugConnection *client);
|
||||
~QmlV8DebuggerClient();
|
||||
@@ -91,14 +106,21 @@ protected:
|
||||
private:
|
||||
void listBreakpoints();
|
||||
void backtrace();
|
||||
void setStackFrames(QByteArray &);
|
||||
void setStackFrames(const QByteArray &message);
|
||||
void setLocals(int frameIndex);
|
||||
void setExpression(QByteArray &message);
|
||||
void updateBreakpoints(QByteArray &message);
|
||||
void expandLocal(QByteArray &message);
|
||||
void setPropertyValue(Json::JsonValue &refs, Json::JsonValue &property, QByteArray &prepend);
|
||||
void setExpression(const QByteArray &message);
|
||||
void updateBreakpoints(const QByteArray &message);
|
||||
void expandLocal(const QByteArray &message);
|
||||
void setPropertyValue(const Json::JsonValue &refs, const Json::JsonValue &property, const QByteArray &prepend);
|
||||
int indexInRef(const Json::JsonValue &refs, int refIndex);
|
||||
QByteArray packMessage(QByteArray& message);
|
||||
QByteArray packMessage(const QByteArray &message);
|
||||
|
||||
void breakOnException(Exceptions exceptionsType, bool enabled);
|
||||
void storeExceptionInformation(const QByteArray &message);
|
||||
void handleException();
|
||||
void clearExceptionSelection();
|
||||
|
||||
void continueDebugging(StepAction type);
|
||||
|
||||
private:
|
||||
QmlV8DebuggerClientPrivate *d;
|
||||
|
||||
Reference in New Issue
Block a user