DevTools Tips: Snippets and live expressions
Watch the video to learn how to:
Create a snippet or open the Snippets pane:
Run your new snippet:
- With the Command / Control + Enter shortcut in Sources
- From the Command Menu using
Pass values to your snippet:
Execute snippets from the Console: load them as global functions and run once.
Use Console Utilities API in your snippets.
- To execute a piece of code you want to run repeatedly, for example, during a debugging session.
- Watch how the values change during execution in real time.
To learn more, see: