💡
2

My code was running fine until I added one more feature

I was adding a feature to my Python script. After I wrote the new code, the whole program gives an error. How can I find out what went wrong?
4 comments

Log in to join the discussion

Log In
4 Comments
lindag33
lindag331mo ago
Actually, maybe you shouldn't just look at the new code. I mean, sometimes it's not the new stuff that breaks things. The old code could have had a hidden bug that only shows up now with the new feature running. Maybe you should test the whole program from the start again, not just the part you changed. It's a pain, but you might be looking in the wrong place completely.
1
seth_shah
seth_shah18d ago
Ugh my buddy spent three days debugging only to find a broken comment from 2018.
7
charlescraig
Your "looking in the wrong place completely" comment is my life. I once rewrote a whole module only to find the issue was a typo in a config file I made six months ago. The old bug just sat there quietly until the new code gave it a chance to shine. Now my first step is always to blame my past self, it's usually right.
3
the_jennifer
Yeah that part about "looking in the wrong place completely" is so real. It makes me wonder what exactly changed in the setup to make the old bug show up now. Was it a new software update on the system, or maybe a different way someone is using the program? Figuring out what's different now besides just your new code might point you right to it. Have you run into a sneaky bug like this before?
2