/dev tips

🎊   The Modern DevTools course has now started! Visit ModernDevTools.com to find out more   🎊

(140) A Modern Front-End Workflow with DevTools Better Stack Traces in Node (142)

Chrome DevTools: Use Quick Open to run predefined JavaScript snippets on your webpage

21st April 2017
Use Quick Open to run predefined JavaScript snippets on your webpage

The Canary Command Menu now has improved behaviour for quickly executing the actions you want in DevTools. You can open up the Command Menu with the shortcut Cmd + Shift + P.

One powerful workflow this allows is to quickly run snippets of JavaScript code such as:

To run a snippet, type in !Your Snippet Name into the Command Menu.

If you type ? into the Command Menu, you see other options like:

The Command Menu has many other features, such as docking options, theme changing, and more. See a bigger list here: Tip #98 Command Menu

Sign up to receive a developer tip, in the form of a gif, in your inbox each week.