Christian Heilmann

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

Tuesday, August 24th, 2021 at 11:34 pm

The demo page with developer tools and the logpoint editor open.

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:

  • Open https://codepo8.github.io/dog-browser/ in the browser
  • Open Developer Tools, go to the Sources tool
  • Locate ‘walkies.js’ and open it
  • Right-click the line number where you’d like to add a logpoint – in this case line 57
  • Select Add logpoint to open the editor
  • In the Editor, enter the expression that you’d like to log – in this case “data”.
  • Hit Enter to save and a badge shows on the line number.
  • 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.

Share on Mastodon (needs instance)

Share on BlueSky

Newsletter

Check out the Dev Digest Newsletter I write every week for WeAreDevelopers. Latest issues:

Don't stop thinking, AI Slop vs. OSS Security, rolling your own S3 Despite AI you still need to think, Bitter lessons from building AI products,  AI Slop vs. OSS security and pointer pointer…
200: Building for the web, what's left after rm -rf & 🌊🐴 vs AI What remains after you do a rm -rf? Why do LLMs know about a seahorse emoji? What image formats should you use? How private is your car?
Word is Doomed, Flawed LLM benchmarks, hard sorting and CSS mistakes Spot LLM benchmark flaws, learn why sorting is hard, how to run Doom in Word and how to say "no" like a manager.
30 years of JS, Browser AI, how attackers use GenAI, whistling code Learn how to use AI in your browser and not on the cloud, why AI makes different mistakes than humans and go and whistle up some code!
197: Dunning-Kruger steroids, state of cloud security, puppies>beer

My other work: