Today, I'm going to talk about Chrome DevTools or cars, but I want to focus on the part that I'm most excited about. So, the first thing I want to talk about is how we try to remove the frictions along the debugging journey to make your debugging flow better.
So let me start with a personal story. Perhaps you have similar stories like that. So recently, my partner and I, we moved to a new house. The good thing is they have a garden. The bad thing is they have a garden which the grass grows from time to time. And then, as a lazy person, we wait until the last minute after the grass grows for a certain length. Then we try to, okay, we have to clean the garden now.
So we walk across the garden and we found that we actually have a pair of scissors in the garden to do the job, but we need to do that manually. That still do the work. And then after that, since we newly moved to the house, we vaguely remember that in the cellar, two level dowels in the garage, the landlord actually left us an electronic glass trimmer to do the stuff. And then we are also not sure whether the glass trimmer is there. It's faster, but we are not so sure. So guess which one we choose, the manual one or the automatic one? Yeah. So we choose the manual one because we think that we can live with that. So we decided that it should be just fast, one hour into the process of manually cutting, we finally went down to the cellar and then searched around the messy cellar, and then finally we found it and then we do the job under 10 minutes, done.
So the reason why I tell this story is not to tell you how lazy I am, it's not, but to think about what are the frictions that I can remove between this process of me fighting and then cutting the grass? How we remove the friction from this process in order to prepare for the next trim? If you think of it, DevTools, probably is like your, sometimes it's like your garage, it's like your cellar, two level dowels, we have a lot of these hidden tools that you might sometimes get it, know it from your colleague, but you know when you're really like, have a problem, and you try to debug it, and then you might find that oh, there's this feature, maybe it's too far away, I roughly remember that, sometimes you might be not enough time to do a Google search to get the result and then you just leave it wherever you can, try to debug the thing, and sometimes it's because the tool is really too hidden, or it could be sometimes that you don't know what you don't know. The tool exists, you don't even think about finding it and using that.
So take for an example, inspecting and debugging disappearing elements. So I guess a lot of us have these issues before, like if you're using Daisy UI or any UI that have a pop drop down, sometimes the drop down result or the styling is not correct, you want to sort of inspect the result and do some code changes, or the other one, probably you have a search drop down, like the YouTube one, that you want to inspect on the result and do something on it, or if you are using bootstrap, this is the pop over that has the questions. So let me do the demo now to show you the problem. Oh, by the way, the first slide that I showed just now is a real screenshot that I took from here. You can actually use %c in the console log to pass in your style, to style your message nicely like this. Cool.
Okay. Get back to the disappearing element. So let's say if I click on this dismissable pop over, I want to debug this thing. I want to change the style. So what I will do is that usually I will just click on the inspect icon.
Comments