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

how to create a debugger for pyqt and python code

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 6.1k 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
    Qt Enthusiast
    wrote on last edited by
    #1

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

    jsulmJ JonBJ 2 Replies Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      insert a lot of print() functions

      1 Reply Last reply
      3
      • Q Qt Enthusiast

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

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on 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

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

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on 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

          • Login

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