MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / register_ide_hooks

Function register_ide_hooks

resources/oid.py:64–86  ·  view source on GitHub ↗

Check if OID was started from an IDE and sets up the required plugins

(debugger,  # type: BridgeInterface
                       event_handler  # type: OpenImageDebuggerEvents
                       )

Source from the content-addressed store, hash-verified

62
63
64def register_ide_hooks(debugger, # type: BridgeInterface
65 event_handler # type: OpenImageDebuggerEvents
66 ):
67 # type: (...) -> None
68 """
69 Check if OID was started from an IDE and sets up the required plugins
70 """
71 import traceback
72 from oidscripts.ides import qtcreator
73
74 ide_initializers = [qtcreator.register_symbol_fetch_hook]
75 error_traces = []
76
77 for initializer in ide_initializers:
78 try:
79 initializer(debugger, event_handler)
80 return
81 except Exception:
82 error_traces.append(traceback.format_exc())
83
84 log.info('Could not activate hooks for any IDEs')
85 # To find out more about this issue, uncomment the line below:
86 # log.info('\n'.join(error_traces))
87
88
89def get_debugger_bridge():

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected