DEV Community

Cover image for Hidden gems of debugging 💎

Hidden gems of debugging 💎

Amandeep Singh on July 23, 2019

Anything that cuts some of your arduous task time is good for your productivity. Debugging is one of those strenuous tasks. Developers strive to wr...
Collapse
 
lostdesign profile image
André

Know another gem 💎 ? -> webgems.io

A site I made for exactly these things, i'd love if you'd send a PR to github.com/webgems/webgems to add this article to the resource list.

Great article!

Collapse
 
aman_singh profile image
Amandeep Singh

Thank you André for your comment. I will definitely look into this and will create a PR soon. 😀

Collapse
 
aman_singh profile image
Amandeep Singh • Edited

Thanks 👏 for sharing this beautiful 💎. Given you have an easy eslint rules set up (or don't mind writing /* eslint-disable-next-line*/, debugger statement can really help. I never tried editing source code directly but I think it will be fun. I have purposely created a code snippet (in VS code) which expands to the aforementioned statement with a debugger in next line. 🙂

// VS code user snippet
  "debugger with eslint-disable-next-line": {
    "prefix": "deb",
    "body": ["/* eslint-disable-next-line */", "debugger;"]
  }
Collapse
 
droidmakk profile image
Afroze Kabeer Khan. M

Copy & Logpoint 🆒. Can also see for arr.sort and arr.filter

Collapse
 
flexdinesh profile image
Dinesh Pandiyan • Edited

This is fantastic. Thanks Aman. XHR breakpoints is an eye-opener. It's also noteworthy mentioning the use case for console.group.

Collapse
 
aman_singh profile image
Amandeep Singh

Thank you, Dinesh. Glad to read that it was helpful. :)

Collapse
 
robincsamuel profile image
Robin C Samuel

This is awesome!! Thanks Aman :)

Collapse
 
aman_singh profile image
Amandeep Singh

Thank you, Robin. Glad that you liked it. 🙂

Collapse
 
bradtaniguchi profile image
Brad

Awesome article! Learned some new things :D

Collapse
 
aman_singh profile image
Amandeep Singh

Thanks, Brad. Happy that this article helped you learn new things. :)

Collapse
 
danivijay profile image
Dani Vijay

This is one of the best posts about debugging. Please do tips and tricks on JS.

Collapse
 
aman_singh profile image
Amandeep Singh

Thanks Vijay for your comment. Glad that you liked the post. I've written another article So you think you know JavaScript? mentioning some of the pitfalls. 🙂

Collapse
 
alexpaper profile image
alexpaper

Amazing! Lot to learn! Thanks!

Collapse
 
aman_singh profile image
Amandeep Singh

Thank you for your comment. Learning little things every day makes you big. :)

Collapse
 
ankurloriya profile image
Ankur Loriya

Thank you to share here.

Collapse
 
aman_singh profile image
Amandeep Singh

Thank you Ankur for reading 🙂

Collapse
 
aman_singh profile image
Amandeep Singh

Thank you, Erick for your lovely words and the suggestions. I will explore other browsers too and see if I can grab some good debugging techniques to extend it into a series. Appreciate 😀

Collapse
 
aman_singh profile image
Amandeep Singh

This is beautiful. Thanks for sharing. 😍