Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Jason McCreary:
The Debugging Golden Rule
Dec 14, 2017 @ 17:41:42

Jason McCreary has a post on the Dev.to site sharing what he calls the "debugging golden rule" to keep in mind when stepping through and trying to debug your code for issues.

Developers, especially new developers, often forget this when debugging. We jump into the debugger. We add tracing statements. We review the commit log.

Such actions can be misguided. Before debugging the code we must follow a moral code. Debugging needs a Golden Rule. A rule to remind developers of a few important facts of debugging.

Boiled down to its basics the "golden rule" here is that, most of the time, it's not the tools that are the issue - it's you and your code. He shares the common thoughts we've all had when debugging ("it's the upgrade, not my code") but points out that, regardless of where the issue is, it still needs to be fixed. Even if it is something in the tool, some odd bug or weird functionality that only kicks in once in a blue moon, you still have to ultimately make it work.

tagged: debugging goldendrule code tools opinion

Link: https://dev.to/gonedark/the-debugging-golden-rule-7cb


Trending Topics: