cherry.debug

cherry.debug.debug(log_dir = './')

[Source]

Description

Enables some debugging utilities for logging and pdb.

Includes:

  • Automatically dropping into a post-mortem pdb debugger session whenever an exception is raised.
  • Enables fast DEBUG logging to a logging file via QueueHandler.
  • Copies all stdout output to the logging file. (Experimental)
References
  1. Automatically start the debugger on an exception (Python recipe), Thomas Heller, 2001, Link
  2. Dealing with handlers that block, Python Documentation, 2019. Link
Arguments
  • log_dir (str, optional, Default: './') - Location to store the log files.
Example
ch.debug.debug()
raise Exception('My exception')
-> raise('My exception')
(Pdb)