haive.core.utils.debugkit.debuggingΒΆ

Enhanced Debugging Utilities

A unified interface for all debugging capabilities including enhanced print debugging, interactive debugging, decorators, and inspection utilities.

Examples

Enhanced debugging (icecream replacement):
>>> from haive.core.utils.dev.debugging import debug
>>> debug.ice("Hello", variable=42)
Interactive debugging:
>>> debug.pdb()  # Enhanced pdb
>>> debug.web(port=8080)  # Web-based debugging
>>> debug.visual()  # Visual debugging with pudb
Automatic exception debugging:
>>> @debug.breakpoint_on_exception
... def risky_function():
...     # Will auto-debug on exceptions
...     pass
Call tracing:
>>> @debug.trace_calls
... def tracked_function():
...     # Will show call trace
...     pass
Variable inspection:
>>> debug.locals_inspect()  # See local variables
>>> debug.stack_trace()     # See call stack

ClassesΒΆ

DebugUtilities

Unified interface for all debugging utilities.

Module ContentsΒΆ

class haive.core.utils.debugkit.debugging.DebugUtilities[source]ΒΆ

Unified interface for all debugging utilities.

breakpoint_on_exception(func)[source]ΒΆ

Decorator to automatically break into debugger on exceptions.

clear_history()[source]ΒΆ

Clear debug history.

Return type:

None

disable()[source]ΒΆ

Disable all debugging utilities.

Return type:

None

enable()[source]ΒΆ

Enable all debugging utilities.

Return type:

None

globals_inspect()[source]ΒΆ

Inspect global variables in the calling frame.

Return type:

dict

history(limit=None)[source]ΒΆ

Get debug history.

Parameters:

limit (int | None)

Return type:

list

ice(*args, **kwargs)[source]ΒΆ

Enhanced print debugging with context (icecream replacement).

locals_inspect()[source]ΒΆ

Inspect local variables in the calling frame.

Return type:

dict

pdb(condition=True)[source]ΒΆ

Start interactive debugging session.

Parameters:

condition (bool)

Return type:

None

stack_trace(limit=None)[source]ΒΆ

Get formatted stack trace.

Parameters:

limit (int | None)

Return type:

str

status()[source]ΒΆ

Get status of available debugging tools.

Return type:

dict

trace_calls(func)[source]ΒΆ

Decorator to trace function calls.

visual(condition=True)[source]ΒΆ

Start visual debugging with pudb.

Parameters:

condition (bool)

Return type:

None

web(port=5555, condition=True)[source]ΒΆ

Start web-based debugging session.

Parameters:
Return type:

None