How to test js error in WordPress
You can test js errors in WordPress by using Google Chrome’s built-in error console or the WordPress Debug Console.
To use the built-in error console:
- Open Google Chrome and navigate to any website that has scripts running on it (like this one).
- Go to Tools > Developer Tools from your browser’s menu bar, or press Ctrl + Shift + I on Windows or Cmd + Opt + I on MacOS at any time during your visit for quick access later on if needed!
Use Google Chrome’s built-in error console
The first thing you’ll want to do is open your browser. Next, open the error console. You can find this by clicking on the three dots in the upper right-hand corner of Chrome and then selecting “Error Console.”
Next, copy/paste your error message into this window and press enter. If there are multiple lines with an error message on them (like in my case), copy/paste each line number along with its corresponding URL into this window as well so we know exactly where our code went wrong! Let’s read: How to Become a Freelance Web Developer in 2023 and Beyond
Use the WordPress Debug Console
The WordPress Debug Console is a browser-based tool that you can use to view errors and warnings that occur on your site. You’ll find it in the admin area under Settings > Development > Debugging in the WordPress admin area.
To use the WordPress Debug Console:
- Open up your browser’s developer tools (for example, Chrome DevTools).