A combination of the ideas in “binary search through spacetime” and “also look at your data”:
If you know a previous time when the code worked, rather than starting your binary search at the halfway point between then and now, it is sometimes useful to begin by going ALL the way back to when it previously worked, and verifying that it does, in fact, work at that point.
This tests a couple of things:
Are you correct about when the code previously worked?
Did your attempt to recreate those conditions successfully recreate ALL of the relevant conditions?
Does the bug depend on some external file or resource that you overlooked and haven’t rewound back to the correct time?
Does the bug depend on some detail of your test process that you didn’t realize was relevant, and the reason it worked before was actually because you were testing it differently?
Does your process for restoring your project to an earlier point even work?
If the bug still happens after you’ve restored to the “known working point”, then you’ll want to figure out why that is before continuing your binary search.
I don’t always do this step. It depends how confident I am about when it worked, how confident I am in my restore process, and how mysterious the bug seems. Sometimes I skip this step initially, but then go back and do it if diagnosing the bug proves harder than expected.
A combination of the ideas in “binary search through spacetime” and “also look at your data”:
If you know a previous time when the code worked, rather than starting your binary search at the halfway point between then and now, it is sometimes useful to begin by going ALL the way back to when it previously worked, and verifying that it does, in fact, work at that point.
This tests a couple of things:
Are you correct about when the code previously worked?
Did your attempt to recreate those conditions successfully recreate ALL of the relevant conditions?
Does the bug depend on some external file or resource that you overlooked and haven’t rewound back to the correct time?
Does the bug depend on some detail of your test process that you didn’t realize was relevant, and the reason it worked before was actually because you were testing it differently?
Does your process for restoring your project to an earlier point even work?
If the bug still happens after you’ve restored to the “known working point”, then you’ll want to figure out why that is before continuing your binary search.
I don’t always do this step. It depends how confident I am about when it worked, how confident I am in my restore process, and how mysterious the bug seems. Sometimes I skip this step initially, but then go back and do it if diagnosing the bug proves harder than expected.