forked from qt-creator/qt-creator
QML JS Debugger: Break when there is an uncaught exception
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
#include <QtGui/QMainWindow>
|
||||
#include <QtGui/QMessageBox>
|
||||
#include <QtGui/QToolTip>
|
||||
#include <QtGui/QTextDocument>
|
||||
|
||||
#include <QtNetwork/QTcpSocket>
|
||||
#include <QtNetwork/QHostAddress>
|
||||
@@ -75,6 +76,7 @@
|
||||
# define XSDEBUG(s) qDebug() << s
|
||||
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
@@ -656,6 +658,16 @@ void QmlEngine::messageReceived(const QByteArray &message)
|
||||
Debugger::DebuggerUISwitcher *uiSwitcher = Debugger::DebuggerUISwitcher::instance();
|
||||
uiSwitcher->setActiveLanguage("C++");
|
||||
|
||||
bool becauseOfexception;
|
||||
stream >> becauseOfexception;
|
||||
if (becauseOfexception) {
|
||||
QString error;
|
||||
stream >> error;
|
||||
|
||||
QString msg = tr("<p>An Uncaught Exception occured in <i>%1</i>:</p><p>%2</p>").arg(stackFrames.value(0).file, Qt::escape(error));
|
||||
showMessageBox(QMessageBox::Information, tr("Uncaught Exception"), msg);
|
||||
}
|
||||
|
||||
|
||||
} else if (command == "RESULT") {
|
||||
WatchData data;
|
||||
|
||||
Reference in New Issue
Block a user