DEV Community

Cover image for Using console.log() on any website? Logpoints let you do that!
Christian Heilmann
Christian Heilmann

Posted on β€’ Originally published at christianheilmann.com

1 1

Using console.log() on any website? Logpoints let you do that!

If you want to know the value of a certain expression in any JavaScript on the web, you can use logpoints for that. It is like injecting a console.log() anywhere you want.

Here's a quick demo:

Here's how the demo works:

  1. Open https://codepo8.github.io/dog-browser/ in the browser
  2. Open Developer Tools, go to the Sources tool
  3. Locate walkies.js and open it
  4. Right-click the line number where you'd like to add a logpoint - in this case line 57
  5. Select Add logpoint to open the editor
  6. In the Editor, enter the expression that you'd like to log - in this case data.
  7. Hit Enter to save and a badge shows on the line number.
  8. Go to the Console, interact with the site and every time line 57 executes, you see the result of the logpoint expression to the console.

You can set as many logpoints as you want. Clicking the badge again removes them.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay