radon icon indicating copy to clipboard operation
radon copied to clipboard

Add debug flag

Open rdbliss opened this issue 5 years ago • 1 comments

Radon currently captures most exceptions that occur while doing its work. This makes it a real pain to discover where a programming mistake was made. (See #170 for an example; there's no debug information.)

Could we add a flag or something to avoid suppressing exceptions? Or perhaps just avoid suppressing them altogether?

rdbliss avatar May 15 '19 18:05 rdbliss

@rwbogl Yes, that would be a good idea. It's not super simple because the error is caught in radon/__init__.py and there is no CLI information. A hack would be to check if "-d" or "--debug" is in sys.argv, and if so re-raise the exception. That's not a very good solution though.

rubik avatar May 17 '19 12:05 rubik