Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
5.4.1
Description
My application has a crash reporting feature to report the C++ stack trace to our developers. We would like to add the QML stack trace to our crash report as well. We've prototyped a technique to do this by cribbing ideas from console.trace(), but it requires access to private implementation details of QQmlEngine.
I request a public API where QQmlEngine can provide an array of stack frames, from which the programmer can retrieve function, source, line number and column number. My ideal public API would be very similar to the QV4::ExecutionEngine::stackTrace() method.
My prototyped technique is as follows:
#include <private/qv8engine_p.h>
#include <QQmlEngine>
QV8Engine* v8engine = qmlEngine->handle();
QV4::ExecutionEngine *qv4engine = QV8Engine::getV4(v8engine);
QVector<QV4::StackFrame> stackTrace = qv4engine->stackTrace();
Instead, I'd like to be able to do something like this:
#include <QQmlEngine>
QVector<QQmlEngine::StackFrame> stackTrace = qmlEngine->stackTrace();
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-47845 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
621763,9 | Add QJSEngine::stackTrace | dev | qt/qtdeclarative | Status: NEW | 0 | 0 |