Start with the most simple, crude and *reliable* way of implementing

If you have an idea of how to fix a bug or develop something new, start with the most simple, crude and reliable way of implementing it in order to demonstrate to yourself that the concept works. After you know the concept works, proceed with adding complexity and sophistication. Very useful with complex bugs.

Study the part of the system that seems related to the bug to help you reproduce it

If you can’t reproduce a certain bug, study only that part of the system so that you can get it to fail. If it’s a problem with the session, study the class(es) dealing with handling of the session. See what methods there are – is the session getting cached in the db? Is it getting cleared from $_SESSION in an attempt to save space? Is there anything in there that looks like it might be related to your bug? Studying those particular aspects of the system will hopefully give you enough understanding so that you can make the bug reproducible.

Simplifying the environment to debug a slow site problem

I was working in Varying Vagrant Vagrants and for some reason the site I was working on was starting to load extremely slowly after a certain amount of time. Not being able to pinpoint the causes, I dumped VVV (which uses a lot of additional technology and configuration) in favor of Vagrant. On Vagrant I installed a bare-bones box with just the minimum required software and configurations. I simplified the environment. This helped me deal with the problem much better than before.

Check that the data is reliable

If you’re doing automation on some data, first check that the data is reliable, i.e. that you can do the manipulations on it manually.