Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. how to create a debugger for pyqt and python code
Forum Updated to NodeBB v4.3 + New Features

how to create a debugger for pyqt and python code

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 6.2k 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.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on 16 Jan 2020, 05:12 last edited by
    #1

    I have a application that python and pyqt code any easier way to debug the application

    J J 2 Replies Last reply 16 Jan 2020, 05:51
    0
    • K Offline
      K Offline
      Kent-Dorfman
      wrote on 16 Jan 2020, 05:19 last edited by
      #2

      insert a lot of print() functions

      1 Reply Last reply
      3
      • Q Qt Enthusiast
        16 Jan 2020, 05:12

        I have a application that python and pyqt code any easier way to debug the application

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 16 Jan 2020, 05:51 last edited by
        #3

        @Qt-Enthusiast said in how to create a debugger for pyqt and python code:

        any easier way to debug the application

        Easier than what?
        Python has a debugger: https://docs.python.org/3/library/pdb.html
        Also you can use debug output as @Kent-Dorfman suggested or use "logging" module to write logs.
        Also, do you use a Python IDE? If so it should provide debugging.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        5
        • Q Qt Enthusiast
          16 Jan 2020, 05:12

          I have a application that python and pyqt code any easier way to debug the application

          J Offline
          J Offline
          JonB
          wrote on 16 Jan 2020, 09:00 last edited by JonB
          #4

          @Qt-Enthusiast
          You should already be using an IDE with debugger to develop your code. If you're just using a text editor like Notepad++, which many seem to, then don't! Get yourself sorted out now!!

          My two suggestions would be either VSCode with Python+PyQt support, which is what I am having to use now: it is lightweight but frankly I am finding rather poor. Or my previous, PyCharm+PyQt support: more heavyweight (e.g. start-up time is cumbersome in comparison to VSCode), but I found a much more comprehensive editing/debugging experience. In addition to debugging, PyCharm at least provides a lot of help/warnings about your Python code at editing time, which is very valuable, especially if you are beginner-ish.

          On a separate note, depending on your usage intentions have you considered changing over from PyQt5 to PySide2, which has LGPL licensing (like Qt itself) instead of GPL? Up to you. Code is almost identical from PyQt5 to PySide2 (so you can still basically follow PyQt sample code), the only notable difference is a slight change in how signals are declared.

          1 Reply Last reply
          3

          1/4

          16 Jan 2020, 05:12

          • Login

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