Find out which function is causing a problem with log files
Copy&paste the function and rename the original function old. e.g. problematic_function_old
Add print statements to the copied one.
Usually I add print statements one by one. And throw an error immediately after the print statement. In this way, I can do some "unit test" inside a function. Reproduce the error but step by step, figuring out from where it goes wrong.
If I'm convinced that the error has been fixed, remove the old function.
OMG, I've been simulating a debugger with print statements. xD
In most cases, I don't use debuggers because they suck!
👋 Hey there, I am Waylon Walker
I am a Husband, Father of two beautiful children, Senior Python Developer currently working in the Data Engineering platform space. I am a continuous learner, and sha
OMG, I've been simulating a debugger with print statements.
🤣
I like the idea of copying the function. For some reason I only do this when developing cli tools, but sometimes I will make a verbose flag, then make a separate print function that does an if versbose fro me and i just call vprint for example.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Mostly with print statements and log files.
problematic_function_old
OMG, I've been simulating a debugger with print statements. xD
In most cases, I don't use debuggers because they suck!
🤣
I like the idea of copying the function. For some reason I only do this when developing cli tools, but sometimes I will make a
verbose
flag, then make a separate print function that does anif versbose
fro me and i just callvprint
for example.