top | item 30757723

(no title)

gnud | 4 years ago

As I understand it, you can plug in the qt pretty printers from https://invent.kde.org/kdevelop/kdevelop/-/tree/master/plugi...

discuss

order

nyanpasu64|4 years ago

How do I use these pretty printers outside of KDevelop? When I source that file from my global .gdbinit, I get the classic Python relative import error:

  ModuleNotFoundError: No module named 'qt'
Changing KDevelop's gdbinit to `from .qt import register_qt_printers` results in:

  ImportError: attempted relative import with no known parent package
The problem is that sourcing KDevelop's gdbinit doesn't let Python import packages relative to that file. Is there an alternative way to do this?