Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to view/print qml stack trace?
Forum Updated to NodeBB v4.3 + New Features

How to view/print qml stack trace?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 2.4k Views 2 Watching
  • 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.
  • P Offline
    P Offline
    patrickkidd
    wrote on 21 Jun 2021, 17:47 last edited by
    #1

    I have an application that is about a 50/50 mix of C++ (Python, actually) and Qml. It is difficult to debug communication between C++ and Qml. While you can put a breakpoint in C++ for a method called by Qml (like model.data()), you don't know what the QML stack that called it looks like.

    Is there some way to view or print the current calling Qml stack trace? FWIW, I am using Visual Code and PyQt and am good with C++.

    https://alaskafamilysystems.com/

    R 1 Reply Last reply 21 Jun 2021, 18:39
    0
    • P patrickkidd
      21 Jun 2021, 17:47

      I have an application that is about a 50/50 mix of C++ (Python, actually) and Qml. It is difficult to debug communication between C++ and Qml. While you can put a breakpoint in C++ for a method called by Qml (like model.data()), you don't know what the QML stack that called it looks like.

      Is there some way to view or print the current calling Qml stack trace? FWIW, I am using Visual Code and PyQt and am good with C++.

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 21 Jun 2021, 18:39 last edited by
      #2

      @patrickkidd
      does this help?
      https://forum.qt.io/topic/122818/get-file-name-line-number-and-function-name-in-qml-javascript-how/4

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      P 1 Reply Last reply 22 Jun 2021, 05:54
      0
      • R raven-worx
        21 Jun 2021, 18:39

        @patrickkidd
        does this help?
        https://forum.qt.io/topic/122818/get-file-name-line-number-and-function-name-in-qml-javascript-how/4

        P Offline
        P Offline
        patrickkidd
        wrote on 22 Jun 2021, 05:54 last edited by
        #3

        @raven-worx Yes it does.

        For the record: print((new Error).stack)

        https://alaskafamilysystems.com/

        1 Reply Last reply
        0

        1/3

        21 Jun 2021, 17:47

        • Login

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