Seeing most of the games contain inner debugging tools such as collision viewing or pathfinding visualizer, I decided to add some visual debugging stuff too.
Usually I never do these kind of stuff since every code I write is according to my ‘holy plan’, and I perceive this 'plan’ as something magical, something perfect, something that can’t be forgotten. Unfortunately my vision was wrong, and those plans weren’t as perfect as I imagined them.
Why? Because as I added more features, modified and optimized the existing structures I forgot about some stuff that I made long time ago, and it’s only now that I see that something went wrong thanks to some custom visual debugging utilities I made.
Here is a pretty illustrated example :

What you see there is the Spatial Grid Registration System ( call it whatever you want it has many names ) used to let a unit find other units by checking nearby blocks instead of checking every single unit on screen ( AKA the O(n) problem ), the spatial grid system allows me to eliminate that problem giving me a great performance boost BUT the system has to be configured the right way. As the first pic shows, the blocks are way too small which isn’t a good thing cause when a unit moves out of a block it has to tell to it that it has left, then tell to the new block that it just joined in, and from the look of that first pic it has to do hell lot of times if it wants to go downhill.

This is the fixed version, the blocks are way bigger and the unit now has to do less work than previously. Fixing everything 😃
This problem would’ve stayed 'invisible’ to me if I hadn’t implemented any visual methods of debugging.
That’s it !