[Qt-creator] Obtain QML stack trace during crash

Spandan Sharma ustulation at gmail.com
Sun Jun 22 14:22:43 CEST 2014


My project is a Qt GUI application in which all views are in QML and Models
and Business logic in C++. As the size of the project has grown to 100's of
cpp and qml files debugging has becoming more and more difficult.
In Debug mode crashes produced in the C++ code are easily found as stack
trace linked to source-code is presented, but crashes due to qml code
produces all grayed out stack-trace (ie., pointing to Qt internals etc
where in you cannot see the qml file and the line producing the error).

Do you know anyway to do that?

I was Using:
Qt/QML 5.2.0, Qt Creator 3.0 on Mac (Clang++, LLDB combination)
Then people suggested me to use 5.3.0 which comes with Creator 3.1.1 and
has additional context-menu item called "Load QML Stack". I did that too
but i get nothing even if i click on Load QML Stack.

If i put a breakpoint on any javascript function in the qml file then the
breakpoint is easily hit during the course of debugging, but the problem is
when the application crashes, i've no way of knowing which qml file/line
could have participated in the crash and so i can't put the breakpoint
beforehand - it should show in the stack-trace but it does not (only shows
grayed out stack-trace)

BR//
-- 
------------
spandan sharma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20140622/df1493ae/attachment.html>


More information about the Qt-creator mailing list