Knowledgebase

Debugging Web Applications Print

  • webdevelopment, caching, errors, permissions, guide, howto, solution, zillionkinghost
  • 0

Finding faults.

WHERE TO LOOK FIRST

The browser console, for frontend errors The server log, for backend errors The network panel, for request failures

WHAT AN ERROR USUALLY STATES

The file, the line and the cause.

WHAT TO DO

Read it, literally, before changing anything.

WHAT TO ESTABLISH

Whether it is frontend or backend Whether it is reproducible What changed beforehand

HOW TO DISTINGUISH FRONTEND FROM BACKEND

Look at the network panel. If the response is wrong, it is the backend. If the response is correct and the page is wrong, it is the frontend.

WHAT THAT SAVES

Considerable time spent in the wrong place.

WHAT TO USE FOR INSPECTING VALUES

The debugger, which pauses and shows everything Console output, for quick checks

WHAT TO PRINT

The value and its type.

WHY

A surprising number of bugs are a value being a different type than assumed.

WHAT TO DO WHEN IT WORKS LOCALLY AND FAILS DEPLOYED

Check versions, environment values, caches, permissions and filename case.

WHAT TO CHANGE

One thing at a time.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot