While Step 2 is all about casting a wide net to form hypotheses, Step 3 is all about testing each hypothesis to prove or disprove it. The goal of this stage is to whittle the list from several possibilities to one or two strong contenders. Depending on the error, you may have a variety of investigation approaches available, and much of this process is up to personal preference. However, many clients have found success through the following measures:
Investigating Error Source Files
You can yield ample insights from digging deeper into code snippets and relevant files uncovered in Step 1. This process alone should separate viable hypotheses from unlikely options, though it requires direct access to the code in your local dev environment. This stage of the investigation might include:
- Searching for related code based on the error's signature or Stacktrace.
- Examining the code logic that led up to the error, with the intent of finding faulty logic.
- Setting breakpoints to see how the code is functioning in the production environment.
Examining Server Logs
This stage is only relevant to HTTP errors. If the error is a result of a network call to your own server, you may be able to examine your server logs for more data to correlate to the error. We recommend revisiting the error's session videos as part of this process. Check the timestamps of the network calls that trigger the error and try to associate these with the events captured in your server logs.
Checking Relevant Documentation
This stage often applies to third party code. It helps to double-check documentation from third-party vendors to ensure the integrations have been configured properly. Faulty integrations cause more errors than you'd think!
However, documentation also comes in handy when examining the libraries used on your site. Many users have reported solving JQuery-related errors based on digging into documentation.
Reproduction
Attempting to reproduce the error is a classic step in the debugging workflow. However, this method is a double-edged sword. A developer can pour an incredible amount of time, energy, and resources into reproducing an error and still come up without a satisfying conclusion. We understand the importance of error reproduction and want to encourage an efficient approach, so we've created a dedicated resource to aid you in the reproduction process.
Once your investigation is complete, you're ready to move on to Step 4: Implementing a Fix & Monitoring Results.