/dev tips

(185) Copy JS Path Code Coverage Export (187)

Chrome DevTools: How to use Logpoints for quicker JavaScript debugging

7th December 2018
How to use Logpoints for quicker JavaScript debugging

You can use the new Logpoint feature to quickly inject a console.log message into your JavaScript code with any variables you like. You can do this without having to pause at a breakpoint which can help your debugging workflow.

To try this out:

  1. Enable the logpoint experiment
  2. Right-click in the Sources Panel line gutter
  3. Select Add logpoint
  4. Enter your desired message to log - this message can include variables which are in scope

This is an experimental feature in Canary v73

Partnership: The TLDR newsletter is focussed on delivering short and interesting stories in tech. Small, digestible emails every weekday! Useful for those wanting to keep up to date with technology.

Sign up to receive a developer tip, in the form of a gif, in your inbox each week.