add a debug function to work with pdb
This commit is contained in:
parent
3d222e3236
commit
0fa077989d
|
@ -10,6 +10,16 @@ class BorgException(Exception):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
# This was taken from here: https://stackoverflow.com/a/1745965/7723859
|
||||||
|
def debug_trace():
|
||||||
|
'''Set a tracepoint in the Python debugger that works with Qt'''
|
||||||
|
from PyQt5.QtCore import pyqtRemoveInputHook
|
||||||
|
|
||||||
|
from pdb import set_trace
|
||||||
|
pyqtRemoveInputHook()
|
||||||
|
set_trace()
|
||||||
|
|
||||||
|
|
||||||
def show_error(e):
|
def show_error(e):
|
||||||
"""Helper function to show an error dialog."""
|
"""Helper function to show an error dialog."""
|
||||||
message = QMessageBox()
|
message = QMessageBox()
|
||||||
|
|
Loading…
Reference in New Issue