Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

updating UI while in debugger



  • Hi all -

    When debugging a UI in single step mode, I often find the UI doesn't update until I hit the "run" button. Can this behavior be altered?

    Thanks...


  • Moderators

    @mzimmers
    afaik the ui is updated when the eventloop runs.

    As a hacky workaround, you could add QCoreApplication::processEvents inside the code block you want to debug, that should, in theory, update your ui.



  • @mzimmers
    Just so you know, all debuggers on all platforms (have to) work like this when debugging a UI-event-driven application. When stepping/running to next breakpoint, it executes only the instructions it comes across, and while they do not allow the UI to process events/repaint the visuals will remain "frozen". It actually shows you what what is really going on in your app!

    Like @J-Hilk says, only way is temporarily to insert necessary event processing lines into the code you happen to be stepping through. Not ideal for debugging, but a standard issue.


  • Banned

    This post is deleted!

Log in to reply