QtDesignStudio/Troubleshooting

From Qt Wiki
Jump to navigation Jump to search

Debugging Qt Design Studio / QML Puppet

  • QML Puppet is a separate executable that executes all QML in the background and communicates via local socket + shared memory.
  • It's located inside the package on macOS, for example, at:
/Applications/Qt Design Studio.app/Contents/Resources/qt6_design_studio_reduced_version/bin/qmlpuppet-4.8.1

Launching with temporary clean settings

"/Applications/Qt Design Studio.app/Contents/MacOS/Qt Design Studio" -tcs

Hidden Debugging Settings in the Preferences Dialog

  • Clicking an empty area of the page 4 times shows additional debugging options.

Debugging section entries:

  • Enable the debugging view - adds a view to the UI that allows monitoring all actions on the internal model.
  • Show the debugging view - shows internal model action debug view.
  • Show property editor warnings - QML errors from Property Editor.
  • Show warn exceptions - warnings for QML exceptions.
  • Forward QML Puppet output - forwards puppet stdout/stderr (qDebug).
  • Debug QML Puppet - waits for the debugger to be attached before any command is sent.
  • Dump QML Puppet environment and arguments - logs full puppet startup info.

These map to keys in QtDesignStudio.ini (see QML section below).

QtDesignStudio.ini

[QML]
Designer\StandAloneMode=true
Designer\EnableQtQuickDesignerDebugView=true
Designer\ShowQtQuickDesignerDebugView=true
Designer\ForwardPuppetOutput=rendermode
Designer\DebugPuppet=rendermode
Designer\PuppetKillTimeout=30000
Designer\ShowPropertyEditorWarnings=true
Designer\showDebugSettings=true

Meaning:

  • StandAloneMode – hides some Creator UI and switches to Qt Design Studio mode.
  • EnableQtQuickDesignerDebugView / ShowQtQuickDesignerDebugView – enable + show. This adds a new view to the UI that allows monitoring all actions on the model.
  • ForwardPuppetOutput – forwards console output of a puppet → qDebug output visible.
  • DebugPuppet – Qt Creator/Qt Design Studio waits for a debugger to attach to QML Puppet.
  • PuppetKillTimeout – timeout (ms) after which an unresponsive puppet is killed (increase for debug builds). If DebugPuppet is enabled, the timeout is disabled.
  • ShowPropertyEditorWarnings – forwards QML errors of the property editor.
  • showDebugSettings – stored flag that the hidden debug settings are currently shown.

Single-process debugging of QML Puppet

  • Record commands sent to the puppet:
qtdesignstudio -capture-puppet-stream crash.stream
  • Replay in a separate single-process step:
qmlpuppet --readcapturedstream crash.stream
  • Basic test of Qt Quick availability:
qmlpuppet --test
  • Run puppet in editor/render/preview modes:
qmlpuppet --qml-puppet editormode 33
qmlpuppet --qml-puppet rendermode 33
qmlpuppet --qml-puppet previewmode 33

(33 = dummy socket; puppet enters the mode and tries to connect.)

  • Render QML to PNG:
qmlpuppet --qml-renderer some.qml
  • Use puppet as QML runtime (similar to qml.exe):
qmlpuppet-4.7.2.exe --qml-runtime \
    -I "C:/Users/User/Documents/QtDesignStudio/examples/TreadmillMcuDemo/imports" \
    -I "C:/Users/User/Documents/QtDesignStudio/examples/TreadmillMcuDemo/." \
    "C:/Users/User/Documents/QtDesignStudio/examples/TreadmillMcuDemo/TreadmillMcuDemo.qml"

Splash screen settings

QtDesignStudio.ini:

[DoNotAskAgain]
StudioSplashScreen=true

[QML]
Designer/lastQDSVersion="3.9"

Splash is shown again when the stored version and the current Qt Design Studio version differ.