Entries tagged "troubleshooting"

Remove Test Code Quickly with a Simple Dreamweaver Search

Adding test code throughout your scripts may be necessary for troubleshooting or adding new features, but how do you go about removing the code? In a previous post, a few techniques for locating the blocks of test code were discussed, but the code still needs to manually removed. Instead, let's tap into Dreamweaver's search for HTML tag feature. [Continue reading]

Making It Easy to Locate and Remove Test Code

When troubleshooting, sometimes it's necessary to add code to test various features. The problem is that the code may accidentally be left in when going live. Removing the extra code as you go may work in most situations. Or maybe you just know where the test code is located and removing it doesn't seem like a problem. However, what happens if you're pulled away from the task by some other emergency or deadline? Over time, the test code you were so familiar with may not be as obvious. Instead of depending on memory, here are some options for making test code stand out. [Continue reading]

Troubleshooting with var_dump()

When code doesn't perform properly, checking that the variables contain what you expect is an important step in solving the problem. Was the value ever assigned to the variable? Does the variable still contain the value? Is the value formatted for the given the scenario? Let's look at some options for finding out. [Continue reading]

Setting up a Makeshift Test Environment for Experimenting with PHP Code

There are times I need to experiment with new code or re-familiarizing myself with code already in use. But there are times when other project code (sending out e-mails, updating databases, etc.) gets in the way of the tests. The code could be commented out to prevent it from executing, but that may be more work than it's worth. Plus I may forget to uncomment something when the tests are over. Instead, it can be easier to create a new file and focus on the code at hand. [Continue reading]