[docs]defweb(self,port:int=5555,condition:bool=True)->None:"""Start web-based debugging session."""ifnotself.debug_enabledornotcondition:returnifnotHAS_WEB_PDB:# Fallback to regular pdbself.pdb(condition)returnweb_pdb.set_trace(port=port)
[docs]defvisual(self,condition:bool=True)->None:"""Start visual debugging with pudb."""ifnotself.debug_enabledornotcondition:returnifnotHAS_PUDB:# Fallback to enhanced pdbself.pdb(condition)returninspect.currentframe().f_backpudb.set_trace()
[docs]defstatus(self)->dict[str,bool]:"""Get status of available debugging tools."""return{"debug_enabled":self.debug_enabled,"pdb":True,# Always available"pdb++":HAS_PDBPP,"ipdb":HAS_IPDB,"web_pdb":HAS_WEB_PDB,"pudb":HAS_PUDB,}