DEV Community 👩‍💻👨‍💻

Cover image for VS Code Tip of the week: The JavaScript Debug Terminal
Nick Taylor for VS Code Tips

Posted on • Originally published at iamdeveloper.com

VS Code Tip of the week: The JavaScript Debug Terminal

I skipped last week's VS Code tip of the week, but for a great reason. I was in Hawaii for my work offsite!

VS Code has an integrated terminal. You can open it and use it like you would an external terminal. One cool thing though in VS Code is you can choose different terminals. One terminal you can select is the JavaScript Debug Terminal.

Context menu to decide which terminal you want to load in VS Code

It's a terminal that loads your regular shell, but if you run anything that is Node.js, it will allow you to debug it. This is super powerful and convenient.

You can start an npm script, a node process, anything that starts Node.js and you're able to add breakpoints in VS Code and debug right away.

I always use to run node --inspect-brk ./some-node-process.js but now that is no longer required in a lot of cases.

Debugging JavaScript in VS Code

If you'd like to learn more about the JavaScript debug terminal, check out the official documenation.

Top comments (0)

This post blew up on DEV in 2020:

js visualized

🚀⚙️ JavaScript Visualized: the JavaScript Engine

As JavaScript devs, we usually don't have to deal with compilers ourselves. However, it's definitely good to know the basics of the JavaScript engine and see how it handles our human-friendly JS code, and turns it into something machines understand! 🥳

Happy coding!