Editor & Dev Environment Setup
A good setup makes Node development faster and catches mistakes before you run anything. You can use any editor, but Visual Studio Code is the de facto standard for Node.js because of its built-in JavaScript/TypeScript intelligence (powered by the same tsserver that ships with TypeScript) and its first-class Node debugger.
Visual Studio Code
Download it from code.visualstudio.com. Out of the box you get autocompletion (IntelliSense), inline type checking for plain JS, and an integrated terminal. The extensions worth adding:
Extension | What it gives you |
|---|---|
ESLint | Flags bugs and anti-patterns as you type |
Prettier | Auto-formats on save so the whole team matches |
Error Lens | Shows errors/warnings inline next to the code |
npm Intellisense | Autocompletes module names in |
DotENV | Syntax highlighting for |
Format on save
Add this to VS Code's settings so Prettier formats every file on save and ESLint auto-fixes what it can:
.vscode/settings.json
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}Type-checking plain JavaScript
You can get TypeScript-level error catching without converting to .ts. Add a jsconfig.json and a // @ts-check comment, and the editor will type-check your JS using JSDoc:
// @ts-check
/** @param {number} a @param {number} b */
function add(a, b) {
return a + b
}
add('1', 2) // editor flags: Argument of type 'string' is not assignableDebugging instead of console.log
VS Code attaches a real debugger to Node — breakpoints, step-through, variable inspection. The simplest entry is the JavaScript Debug Terminal: open it from the command palette and any node command you run there is debuggable. Or commit a launch config:
.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug app.js",
"program": "${workspaceFolder}/app.js"
}
]
}The full story — breakpoints, the inspector protocol, Chrome DevTools — is in Debugging Node.js.
The integrated terminal
Open it with **Ctrl + ** (backtick). Running node, npm`, and your scripts here keeps everything in one window, and VS Code picks up the Node version from your version manager.
A minimal project skeleton
Most Node projects start the same way:
mkdir my-app && cd my-app npm init -y # creates package.json git init # start version control printf "node_modules\n.env\n" > .gitignore
Other good editors
WebStorm — a full IDE with deep Node/JS support and a great debugger (paid).
Neovim / Vim — with the LSP (
tsserver) for terminal lovers.Cursor / Zed — modern editors with built-in AI assistance.