Important: Please read the Qt Code of Conduct -

QML breakpoints and debugger not enabled

  • Hello All,

    This post is actually two separate issues but are both related to QML;

    #1) I have inherited some code from a previous developer/consulting group based on VS 2015 and Qt V4.?
    I upgraded the project to VS 2019, Qt V5.14.0 and installed the Qt visual studio tools v2.4.3. Using the Qt vs tools I went through each project and used 'Convert custom build steps to Qt/MSBuild'. I then went through each project and enabled QML debugging using the project property pages. Now when I run the main application I get the following error displayed in the debug window;

    Qt VS Tools: QML debug: Debugging project 'firstproject'...
    Qt VS Tools: QML debug: DISABLED: QML debugging disabled in Qt project settings

    Why does it claim that the option is disabled when I have enabled it using the project properties?

    #2) I have another project that statically links against a library that contains some C++ bridge classes and QML. When I run this program it connects to the QML engine as shown below;

    Qt VS Tools: QML debug: Debugging project 'other'...
    Qt VS Tools: QML debug: Starting QML debug session...
    'other.exe' (QML): Connecting to the QML runtime...
    QML Debugger: Connecting to socket {B12702AD-ABFB-343A-A199-8E24837244A3}...

    I can set and trigger breakpoints on the C++ classes within the library but when I set a breakpoint on the QML code the debugger it states 'The breakpoint will not currently be hit. No symbols have been loaded for this document."

    Is there a compiler option that must be enabled to generate the debug information for the QML code?

    Any help on these two issues would be greatly appreciated.

  • I have the same problem. It works in small test vcproj projects, but it doesn't seem to work on my larger vcproj. There is also the same logging output as mentioned in #1).

    I suspect it cannot find any "valid" qml files in the vcproj, since the blog says it only invokes the debugger if there are any source qml files in the project.
    I found that adding a .qml file AND a resource.qrc with that .qml file added to it then launches the QML debugger process on debug session start.

    Anyone have some tips or explanation what to do about "DISABLED: QML debugging disabled in Qt project settings" ?

    I am still figuring out what is the difference between my test projects with QML-debugging working fine and my "real" project.

  • .. so it helped a bit to enable QML debugging for all configurations and platforms, to make it work in debug 64bit. Then there is no more "disabled in settings" message, and the QML debugging process starts, but exists silently after a few seconds. Still no debugging possible...

  • Reposting my answer from a related thread for the sake of other developers searching for solutions of issues similar to #2).

    I had hard time using QML debugging within Visual Studio. The QML debug process mentioned in the original Qt blog post was starting but then exiting after a minute or so with the Debug output like

    The thread 'QML Debugger' (0x457c) has exited with code 0 (0x0).
    The program 'My Application.exe: QML Debugger' has exited with code 0 (0x0).

    My breakpoints in QML code were inactive with a tooltip

    The breakpoint will not currently be hit. No symbols have been loaded for this document.

    After some research, I found the following hint in the QML Debugging Infrastructure documentation:

    Note: The qmltooling plugins that are required for debugging and profiling QML applications on devices are automatically installed during Qt installation. They must be deployed to the devices for debugging and profiling to work.

    Once I copied that directory from Qt into my application, next to other plug-in directories like platforms, from the next debugging session things started to work the way announced in the blog post.

    Qt 5.15.2, VS 2017 (15.9.34), Qt VS Tools 2.7.1-8.

Log in to reply