Node.js Debugging from CLI — Find & Fix Bugs Faster
Debug your Node.js applications using Chrome DevTools — no IDE needed:
Step-by-Step Debug Session:
```cmd
node --inspect-brk server.js
`
Then in Chrome:
Environment Variable Debugging:
```cmd
node -e "console.log('PORT:', process.env.PORT)"
node -e "console.log('NODE_ENV:', process.env.NODE_ENV)"
`
Quick Script Testing:
```cmd
node -e "const jwt = require('jsonwebtoken'); console.log(jwt.sign({id:1}, 'secret'))"
`
Test individual Node.js functions directly from CMD without running the whole server! 🎯
