Qt World Summit: Register Today!

Qt VS Tools, QML Debugging

  • Hello there.
    I have problem with breakpoints in QML files, they are not working in Visual Studio. In project settings "Enable QML Debugging" is set to "Yes".
    In console there are this lines:

    Qt VS Tools: QML debug: Debugging Project 'project'...
    Qt VS Tools: QML Debug: Starting QML debug session...
    (QML): Connecting to the QML runtime...
    QML Debugger: Connecting to socket {...}...

    So looks like the debugger is active, but why breakpoints does not work?

    Qt 5.13.1, VS2015, Qt VS Tools 2.4.2

  • Did you solve the problem ? I haven’t yet !

  • Posting for the sake of other developers searching for solutions of similar issues.

    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