Back to blog

Using Chrome Dev Tools

Hello HaWkers! Jeff Bruchado here.

This is the last article in our series that aimed to Learn Programming from Scratch.

I'm going to miss this 😢

And you? Did you enjoy this journey to learn programming? Did you manage to learn something from this article series? Please reply to this email.

But since we're not done yet.

Today we're going to learn to use Chrome Dev Tools.

Using Chrome Dev Tools is like having a Swiss army knife in programming.

It's that toolbox full of tricks that helps you understand and improve what's happening on your website or web application.

Why is it a must-have for any developer?

  1. Debugging: With Dev Tools, you can hunt bugs like a detective. Got code that isn't working? Open the console, put in some breakpoints, and see exactly where things are going wrong.

  2. Performance: Want your site to load at the speed of light? Use the "Performance" tab to analyze what's heavy and optimize loading.

  3. Styling: Play with CSS in real-time? Yes, please! With Dev Tools, you can adjust your site's style live and see changes instantly.

  4. Network Analysis: Want to know how long your images or scripts are taking to load? Take a look at the "Network" tab.

  5. Experimentation: Test changes without fear of breaking everything. With Dev Tools, you can experiment with changes to your site's HTML, CSS, and JavaScript without affecting the real code.

How to use Chrome Dev Tools?

Using Chrome Dev Tools is like having X-ray vision for your site.

You can see everything that's happening behind the scenes, adjust, experiment, and improve. It's an essential skill for any web developer who wants to take their projects to the next level.

  1. Opening: Right-click on the page and select "Inspect" or use Ctrl+Shift+I (Cmd+Option+I on Mac). Boom! Welcome to the backstage of your site.

  2. Console: This is where you see error messages, can run JavaScript code quickly, or check variable values.

  3. Elements: This is where you change HTML and CSS. Want to see how your site looks with a different font? Change it and check instantly.

  4. Network: This tab is a treasure. It shows all the resources your site is loading, how long each takes, and if something is failing. You can even verify the response of HTTP requests made to your APIs.

  5. Performance: Here you analyze your site's performance. See what's making it slow and what you can do to turbocharge it.

  6. Sources: This is your debug headquarters. You can put breakpoints, look at variable values in real-time, and understand your code flow.

  7. Device Mode: This is the mode that tests how your site looks on different devices. Just click the mobile device icon to simulate different screen sizes and resolutions.

It's like being the coach of your own soccer team, watching every play and adjusting strategy in real-time!


Using Chrome Dev Tools

It's very important for you to learn to use Chrome Dev Tools - it's a set of development tools built into Google Chrome that allow developers to debug, debug, and modify web applications in real-time.

It provides a series of features and options that can help identify and fix problems with a site's code.

Those who benefit most from this tool are Frontend programmers (myself included), we basically work with VSCode, where we modify the code, and with Chrome's Dev Tools, to debug and analyze if the code is executing what it should execute, we use it to detect JavaScript errors and logical errors, CSS styling problems, or even just quick temporary changes to the DOM (Document Object Model).

To enter the developer tools, right-click and click Inspect (or press CTRL+SHIFT+C for Windows users / CMD+OPT+C for MAC users) to enter the Elements panel.

Here you can debug CSS and HTML problems. If you want to see logged messages or interact with JavaScript, go to the Console tab from the tabs above (or press CTRL+SHIFT+J or F12/cmd+opt+j to enter directly).

NOTE: This is not a Chrome-specific feature, and most browsers (Chromium-based or not) will have their own set of developer tools, largely similar.


Learning to Debug Problems

The Debugger is one of the main Chrome DevTools tools for debugging code problems. It allows you to set breakpoints in your code, which means the browser will pause code execution when it reaches those points.

This allows you to examine your application's state and check what's happening at each step.

For example, imagine you have an application that's generating a "TypeError: Cannot read property 'name' of undefined" error.

You can use the Debugger to set a breakpoint in the code that's generating the error and then examine the state of the "object" variable to see why it's undefined. This can help you identify the problem and fix it.


Conclusion

We've reached the end of our course "Learning JavaScript from Scratch", but it doesn't stop there!

💡Your journey in the programming world has just begun!

Throughout this material, I shared with you the fundamentals of JavaScript and Programming, valuable examples, and useful tips to facilitate learning.

However, to master this skill, it's essential to put what you learned into practice. So, let me show you some important guidelines:

Maintain consistency in your studies

It's possible that, at first, the concepts may seem confusing, but don't give up! Keep studying and practicing, because at some point, everything will become clear. And when that happens, don't forget to share your achievements with me!

Explore other sources of knowledge

The developer community is rich in resources and collaboration. So, keep looking for other sources of knowledge like courses, tutorials, forums, and discussion groups to further improve your skills in this vast world.

Discipline is fundamental!

Dedicate yourself and invest time in studies, every day! Remember that dedication and persistence are indispensable ingredients for success. Although there's no easy path, with effort, the results will be rewarding!

Keep in mind that this course is just the starting point. Now it's up to you to continue exploring, learning, and evolving as a developer.

And remember, if you want access to this complete and condensed material with what you need to learn, and what's not so important, click this link and have access to it in a format you can study in a more organized way.

💡I'm convinced that you will thrive in this universe!

I wish from the bottom of my heart an extraordinary journey and, if you have questions, I'll always be available to help.

If you made it this far, as usual, please reply to this email with "I managed to complete the Learning Programming from Scratch course".

This way I'll know that this article series was useful for you, and that you followed along and took advantage.

From today I'll include you in a new list, where you'll continue receiving articles, but on less targeted topics like these.

💡However with the same purpose, to help you evolve in your career and achieve everything you want for your life.

As you already know! Only a true HaWker makes it to the end.

Congratulations!

I'm happy to have you here.

See you soon.

Let's go! 🦅

- Jeff Bruchado.


When you feel the time is right, there are 2 ways I can help you:

01) Learning JavaScript from Scratch: Become a valuable programmer and learn to program using JavaScript, with organized and condensed content focused on what really matters for you to learn. The content has all the articles I've been sharing weekly with you, and also has practical exercises, with answers for you to learn the theory and immediately start getting hands-on.

02) Consulting: Join my mentorship and have classes directly with me. If you're interested in this, reply to this email with "I'm interested in the mentorship."

Congratulations on making it this far, HaWker! 🎉

Now that you've learned about using Chrome Dev Tools, how about testing your knowledge? Take the quiz below and see how much you absorbed from our article.

It's a great way to reinforce learning and prepare for the next steps in your programming journey.

Click to access the quiz.

Good luck and have fun!

Comments (0)

This article has no comments yet 😢. Be the first! 🚀🦅

Add comments