Press Command+Option+J (Mac) or Control+Shift+J (Windows, Linux, Chrome OS) to open the Console, right here on this very page.
Focus your cursor somewhere inside of DevTools. Press Control+Shift+P or Command+Shift+P (Mac) to open the Command Menu. Start typing Snippets , select Show Snippets, and then press Enter to run the command.
Expand the “Mouse” item and check the events you want to break on (e.g. “click”, “mousedown”). Then go click in your page and see the JS execution break in the DevTools.
- Open Terminal or Command Prompt.
- Set Path to where File is Located (using cd).
- Type “node New. js” and Click Enter.
- open terminal,
- create an empty file: touch script.js ,
- edit file and add a simple function: var add = (a, b) => a + b; console. log(add(5, 10));
- run script using node script. js command,
- the output should be 15 . Leave a comment. false.
How do I go into developer mode in Chrome?
To open the developer console in Google Chrome, open the Chrome Menu in the upper-right-hand corner of the browser window and select More Tools > Developer Tools. You can also use Option + ⌘ + J (on macOS), or Shift + CTRL + J (on Windows/Linux).