Debugging with Qt
Whether you are using PySide or PyQt, you will likely run into sites where you need to debug the application or script. We have already covered one way to do so, by utilizing the QWebView GUI show() method to "see" what is being rendered on the page you've loaded. You can also use the page().mainFrame().toHtml() chain (easily referenced when using the BrowserRender class via the html method to pull the HTML at any point, write it to a file and save and then open it in your browser.
In addition, there are several useful Python debuggers, such as pdb which you can integrate into your script and then use breakpoints to step through the code where the error, issue or bug is expressed. There are several different ways to set ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access