Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt VS Tools, QML Debugging

Qt VS Tools, QML Debugging

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qmlvisual studio
4 Posts 4 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Quawetim
    wrote on 13 Nov 2019, 06:17 last edited by
    #1

    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

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VeNToR
      wrote on 29 Nov 2020, 11:54 last edited by
      #2

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

      1 Reply Last reply
      0
      • R Offline
        R Offline
        R Kh
        wrote on 25 Mar 2021, 02:05 last edited by
        #3

        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.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cool258
          wrote on 23 Jan 2025, 07:26 last edited by
          #4

          After much back and forth, I finally figured out how to debug QML code using the current QT Visual Studio tools with CMake + Qt + Visual Studio IDE. First, if you have a project built with CMake + Qt, open the root directory of your project using the "Open Folder" method in Visual Studio 2022, and select the CMakeLists.txt file. At this point, Visual Studio 2022 IDE will create CMakePresets.json and CMakeUserPresets.json for you based on the QT Visual Studio tools.

          At this stage, you can only modify CMakeUserPresets.json to configure the dependencies required for building your project, ensuring that your project can be successfully built. Once the build is successful, you can directly press F5 to start debugging.

          I hope the method I discovered can help those who have this need.....

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved