Depuración de JavaScript
En The 16 JavaScript debugging tips you probably didn’t know se explican 16 técnicas que ayudan a depurar el código JavaScript:
- debugger
- Display objects as a table
- Try all the sizes
- How to find your DOM elements quickly
- Benchmark loops using console.time() and console.timeEnd()
- Get the stack trace for a function
- Unminify code as an easy way to debug JavaScript
- Quick-find a function to debug
- Black box scripts that are NOT relevant
- Find the important things in complex debugging
- Watch specific function calls and arguments
- Quickly access elements in the console
- Postman is great (but Firefox is faster)
- Break on node change
- Use page speed services
- Breakpoints everywhere
Deja un comentario