Writing code is only one small piece of being a developer. In order to be efficient and capable at our jobs, we must also excel at debugging. When I dedicate some time to learning new debugging skills, I often find I can move much quicker, and add more value to the teams I work on. I have a few tips and tricks I rely on pretty heavily and found that I give the same advice again and again during workshops, so here’s a compilation of some of them, as well as some from the community. We’ll start with some core tenets and then drill down to more specific examples.
# Rename your local branch. If you are on the branch to rename:
git branch -m branch-new-name
# Delete the old-name remote branch and push the new-name local branch.
git push origin :branch-old-name branch-new-name
# Reset the upstream branch for the new-name local branch.
git push origin -u branch-new-name
Thanks to, multiplestates.wordpress.com.
Identifying Metadata Inside package.json
- THE NAME PROPERTY
- THE VERSION PROPERTY
- THE LICENSE PROPERTY
- THE DESCRIPTION PROPERTY
- THE KEYWORDS PROPERTY
Functional Metadata Inside package.json
- THE MAIN PROPERTY
- THE REPOSITORY PROPERTY
- THE SCRIPTS PROPERTY
- THE DEPENDENCIES PROPERTY
- THE DEVDEPENDENCIES PROPERTY
Can’t we just turn it off?
Unfortunately the downside of caching is something we must tolerate; simply because the mild inconvenience of changes not being immediately visible is far out weighed by the increased speed and efficiency of your website and server.
A quick and easy solution to this problem is to have your JS import the breakpoints directly from the CSS values in the DOM. This solution brings the current breakpoint variable into your JS in a way that’s:
- Simple & Lightweight
- Compatible with all browsers that support media queries (IE9+)
- Animation inspection
- Pretty Screenshotting
- $0 in console
- Arrow functions in the console
- Selector selecting
- Experimenting with colors
- Checking the rendered font
- Edit any text on the page
- Filtering on the network tab
- Dark theme
- Chrome snippets
Thanks to, Twelve Fancy Chrome DevTools Tips