DEV Community

Peter Mekhaeil
Peter Mekhaeil

Posted on • Edited on

3 2

Logging variables in Chrome DevTools using logpoints

logpoints in Chrome DevTools allow you insert logging statements without adding breakpoints.

Right-click on the line you want to log:

Screenshot 2022-05-24 at 9 19 45 PM

Add the statement you would like to output to the console:

Screenshot 2022-05-24 at 9 23 58 PM

Everytime the code runs on this logpoint, it will output to the console:

Screenshot 2022-05-24 at 9 27 54 PM

This allows for quick console logging without having you to touch your source code and without having to add breakpoints.

Today I Learned
I share what I learn on Today I Learned.

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

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

Okay