Dino Geek, try to help you

How to use debug mode in JavaScript?


Debugging in Javascript can be made easy by using the browser’s Developer Tools. Here’s how to use it:

1. Open the Developer Tools on your browser. On Google Chrome, do so by going to Menu > More Tools > Developer Tools or by using the shortcut key (F12 or Ctrl+ Shift+ I on Windows/Linux and Cmd + Opt + I on Mac).

1. Enable the Source Tab. Find the ‘Sources’ tab to view your website’s files.

1. Open Your File. Click File > Open to open your JavaScript file.

1. Set Breakpoints. You can set breakpoints by clicking on the line number. The code will pause execution when it hits a breakpoint.

1. Start Debugging. Refresh your website. The code execution will stop at your breakpoint.

1. Analyze Variable Information. You can hover over variables to check their values, or use the ‘Scope’ section to view parameters.

1. Step Through The Code. Use the buttons on the top right, next to the play button, to step over lines, step into function calls, or step out of the function calls.

In addition, you can use console.log(), console.info(), console.error(), etc., to print information to the console at runtime for debugging purposes.

One more thing to keep in mind is the usage of the ‘debugger’ statement. You can embed this statement in your JavaScript code which will automatically create a breakpoint when the code is run.

Always remember, proper usage of console and debugger can save a lot of time in detecting and fixing issues in your program.


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use