Commit 30d4c004 authored by hjk's avatar hjk
Browse files

debugger: some more verbose qml debug output

parent a59f45c5
...@@ -106,12 +106,19 @@ class QmlDebuggerClient : public QDeclarativeDebugClient ...@@ -106,12 +106,19 @@ class QmlDebuggerClient : public QDeclarativeDebugClient
public: public:
QmlDebuggerClient(QDeclarativeDebugConnection *connection, QmlEngine *engine) QmlDebuggerClient(QDeclarativeDebugConnection *connection, QmlEngine *engine)
: QDeclarativeDebugClient(QLatin1String("Debugger"), connection) : QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), connection)
, m_connection(connection), m_engine(engine) , m_connection(connection), m_engine(engine)
{ {
setEnabled(true); setEnabled(true);
} }
void sendMessage(const QByteArray &msg)
{
QTC_ASSERT(isConnected(), /**/);
qDebug() << "SENDING: " << quoteUnprintableLatin1(msg);
QDeclarativeDebugClient::sendMessage(msg);
}
void messageReceived(const QByteArray &data) void messageReceived(const QByteArray &data)
{ {
m_engine->messageReceived(data); m_engine->messageReceived(data);
...@@ -615,7 +622,7 @@ void QmlEngine::messageReceived(const QByteArray &message) ...@@ -615,7 +622,7 @@ void QmlEngine::messageReceived(const QByteArray &message)
qDebug() << "RECEIVED COMMAND: " << command; qDebug() << "RECEIVED COMMAND: " << command;
showMessage(_("RECEIVED RESPONSE" + command)); showMessage(_("RECEIVED RESPONSE: ") + quoteUnprintableLatin1(message));
if (command == "STOPPED") { if (command == "STOPPED") {
setState(InferiorStopping); setState(InferiorStopping);
setState(InferiorStopped); setState(InferiorStopped);
...@@ -726,14 +733,18 @@ void QmlEngine::handleProcFinished(int code, QProcess::ExitStatus type) ...@@ -726,14 +733,18 @@ void QmlEngine::handleProcFinished(int code, QProcess::ExitStatus type)
void QmlEngine::readProcStandardError() void QmlEngine::readProcStandardError()
{ {
qDebug() << "STD ERR" << m_proc.readAllStandardError(); QString msg = QString::fromUtf8(m_proc.readAllStandardError());
if (!m_conn) if (!m_conn)
setupConnection(); setupConnection();
qDebug() << "STD ERR" << msg;
showMessage(msg, AppError);
} }
void QmlEngine::readProcStandardOutput() void QmlEngine::readProcStandardOutput()
{ {
qDebug() << "STD ERR" << m_proc.readAllStandardOutput(); QString msg = QString::fromUtf8(m_proc.readAllStandardOutput());
qDebug() << "STD OUT" << msg;
showMessage(msg, AppOutput);
} }
void QmlEngine::connectionStateChanged() void QmlEngine::connectionStateChanged()
...@@ -1359,7 +1370,7 @@ void QmlEngine::enginesChanged(QDeclarativeDebugEnginesQuery *query) ...@@ -1359,7 +1370,7 @@ void QmlEngine::enginesChanged(QDeclarativeDebugEnginesQuery *query)
//m_engineComboBox->clearEngines(); //m_engineComboBox->clearEngines();
QList<QDeclarativeDebugEngineReference> engines = query->engines(); QList<QDeclarativeDebugEngineReference> engines = query->engines();
if (engines.isEmpty()) if (engines.isEmpty())
qWarning("qmldebugger: no engines found!"); qWarning("QMLDEBUGGER: NO ENGINES FOUND!");
//m_engineComboBox->setEnabled(true); //m_engineComboBox->setEnabled(true);
......
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