Meego Wiki
Views

User:Sabotage/QML Debugging

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(Environment variables)
(QML_XHR_DUMP)
Line 89: Line 89:
TBD (please describe what this does if you know)
TBD (please describe what this does if you know)
==QML_XHR_DUMP==
==QML_XHR_DUMP==
-
TBD (please describe what this does if you know)
+
Reports on XMLHttpRequest activity.  Need more details, so please describe how to use this data if you know
 +
 
==QML_IMPORT_TRACE==
==QML_IMPORT_TRACE==
Dump details on the import actions being taken, including which Types are "resolved" by with imported qml files.  Helps to trace unexpected results to possible namespace collision and/or search path order issues.  For example:
Dump details on the import actions being taken, including which Types are "resolved" by with imported qml files.  Helps to trace unexpected results to possible namespace collision and/or search path order issues.  For example:

Revision as of 19:30, 21 July 2011

Contents

Environment variables

Try enabling (setting to non-zero value) in the environment before launching your QML app to get all kinds of interesting data about the runtime execution and data related to your QML app.

QML_SHOW_FRAMERATE

Dump stats during painting events, for example:

...
Debug: paintEvent: 13 time since last frame: 36
...

QML_ENABLE_TEXT_IMAGE_CACHE

TBD (please describe what this does if you know)

QML_BINDINGS_DUMP

Report details about various bindings between elements, for example:

...
Warning: Program.bindings: 1 
Warning: Program.dataLength: 28 
Warning: Program.subscriptions: 1 
Warning: Program.indentifiers: 0 
Warning: 	Skip			-1	0
Warning: 121:31:
Warning: 	LoadScope		0	0
Warning: 	FetchAndSubscribe	0	0	0
Warning: 	Store			0	16	0
Warning: 	Done
...
If you know how to use/interpret this data, please add that info here, or link to someplace that does.

QML_COMPILER_DUMP

Report runtime compiler operations and data per .qml parsed, for example:

...
Warning: -------------------------------------------------------------------------------
Warning: "file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Indicators/StatusBar.qml"
Warning: Index  Line    Operation               Data1   Data2   Data3   Comments
Warning: -------------------------------------------------------------------------------
Warning: 0      0       INIT                    33      16      0       0
Warning: 1      43      CREATE                  0       -1              "Item"
Warning: 2      0       STORE_META              1
Warning: 3      0       SETID                   0                       "container"
Warning: 4      43      BEGIN                   16
Warning: 5      47      STORE_BINDING   4       3       0
Warning: 6      66      CREATE_SIMPLE           12
Warning: 7      0       DEFER                   8
Warning: 8      0       INIT                    33      16      -1      -1
Warning: 9      67      CREATE_SIMPLE           20
Warning: 10     67      BEGIN                   12
...
If you have good ideas on how to use this data, please add that info here, or link to someplace that does.

QML_COMPILER_STATS

Reports various statistics about components (objects, IDs, bindings) for each .qml parsed, for example:

...
Warning: QML Document: "file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Indicators/StatusBar.qml"
Warning:     Component Line 100
Warning:         Total Objects:      5
Warning:         IDs Used:           3
Warning:         Optimized Bindings: 1
Warning:             (121:31)
Warning:         QScript Bindings:   6
Warning:             (112:20) (127:24) (114:20) (103:16) (113:21) (125:33)
Warning:     Component Line 242
Warning:         Total Objects:      1
Warning:         IDs Used:           0
Warning:         Optimized Bindings: 0
Warning:         QScript Bindings:   0
Warning:     Component Line 43
Warning:         Total Objects:      24
Warning:         IDs Used:           13
Warning:         Optimized Bindings: 25
Warning:             (200:24) (187:17) (75:23) (68:23) (163:23) (176:17) (261:23) (147:21) (151:21) (140:23)
            (142:18) (189:18) (155:27) (204:31) (175:24) (168:27) (256:17) (145:23) (185:24) (156:17)
            (255:24) (165:15) (169:18) (188:16) (160:18)
Warning:         QScript Bindings:   8
Warning:             (82:40) (45:40) (141:16) (46:38) (159:17) (203:38) (158:25) (47:40)
...
If you have good ideas on how to use this data, please add that info here, or link to someplace that does.

QML_REWRITE_DUMP

Reports out all the rewritten code during the parsing phase, for example:

...
Warning: =============================================================
Warning: Rewrote:
Warning: (typeof theme_panelStatusBarOpacity == "undefined") ? 0.4 : theme_panelStatusBarOpacity
Warning: To:
Warning: (function $panelStatusBarOpacity() { return (typeof theme_panelStatusBarOpacity == "undefined") ? 0.4 : theme_panelStatusBarOpacity })
Warning: =============================================================
...

QML_EXPERIMENTAL

TBD (please describe what this does if you know)

QML_DISABLE_FAST_PROPERTIES

TBD (please describe what this does if you know)

QML_DISABLE_OPTIMIZER

TBD (please describe what this does if you know)

QML_XHR_DUMP

Reports on XMLHttpRequest activity. Need more details, so please describe how to use this data if you know

QML_IMPORT_TRACE

Dump details on the import actions being taken, including which Types are "resolved" by with imported qml files. Helps to trace unexpected results to possible namespace collision and/or search path order issues. For example:

...
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Common/Window.qml)::addImport: "MeeGo.Components" 0.1 Library as ""
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Common/Window.qml::importExtension: loaded "/usr/lib/qt4/imports/MeeGo/Components/qmldir"
Debug: QDeclarativeImportDatabase::importPlugin: "MeeGo.Components" from "/usr/lib/qt4/imports/MeeGo/Components/libmeego-ux-components-datetime.so"
Debug: QDeclarativeImportDatabase::importPlugin: "MeeGo.Components" from "/usr/lib/qt4/imports/MeeGo/Components/libmeego-ux-components-indicators.so"
Debug: QDeclarativeImportDatabase::importPlugin: "MeeGo.Components" from "/usr/lib/qt4/imports/MeeGo/Components/libmeego-ux-kernel.so"
Debug: QDeclarativeImportDatabase::importPlugin: "MeeGo.Components" from "/usr/lib/qt4/imports/MeeGo/Components/libmeego-ux-models.so"
Debug: QDeclarativeImportDatabase::importPlugin: "MeeGo.Components" from "/usr/lib/qt4/imports/MeeGo/Components/libmeego-ux-units.so"
Debug: QDeclarativeImportDatabase::importPlugin: "MeeGo.Components" from "/usr/lib/qt4/imports/MeeGo/Components/libmeego-ux-gestures.so"
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Common/Window.qml)::resolveType: "Item" => "QDeclarativeItem"
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Common/Window.qml)::resolveType: "Theme" => QUrl("file:///usr/lib/qt4/imports/MeeGo/Ux/Kernel/Theme.qml")
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Kernel/Theme.qml)::addImport: "." -1.-1 File as ""
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Kernel/Theme.qml::importExtension: loaded "/usr/lib/qt4/imports/MeeGo/Ux/Kernel/qmldir"
Debug: QDeclarativeImportDatabase::importPlugin: "MeeGo.Ux.Kernel" from "/usr/lib/qt4/imports/MeeGo/Ux/Kernel/libmeego-ux-kernel.so"
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Kernel/Theme.qml)::addImport: "Qt" 4.7 Library as ""
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Kernel/Theme.qml)::resolveType: "Item" => "QDeclarativeItem"
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Common/Window.qml)::resolveType: "Translator" => "Translator"
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Common/Window.qml)::resolveType: "Rectangle" => "QDeclarativeRectangle"
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Common/Window.qml)::resolveType: "StatusBar" => QUrl("file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Indicators/StatusBar.qml")
Debug: QDeclarativeImports(file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Indicators/StatusBar.qml)::addImport: "." -1.-1 File as ""
...

QML_IMPORT_PATH

Alter the paths search to resolve "import" directives

QML_CHECK_TYPES

Enable stricter type checking, reporting and debugging, for example:

...
Warning: file:///usr/share/meego-app-test/main.qml:29:1: Type Window unavailable
     Window {
     ^
Warning: file:///usr/lib/qt4/imports/MeeGo/Ux/Components/Common/Window.qml:441:5: Theme is ambiguous. Found in file:///usr/lib/qt4/imports/MeeGo/Components and in file:///usr/lib/qt4/imports/MeeGo/Ux/Kernel
         Theme { id: theme }
         ^
Debug: Raising window
...
Personal tools